*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

.sm-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.sm-hero {
  text-align: center;
  margin-bottom: 40px;
}

.sm-hero-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.sm-home-link {
  color: #475569;
  font-size: 14px;
  text-decoration: none;
}

.sm-home-link:hover {
  color: #0f172a;
  text-decoration: underline;
}

.sm-brand {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  margin-bottom: 18px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #ffffff;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
}

.sm-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.sm-hero-desc,
.sm-section-desc,
.sm-feature-card p,
.sm-faq-item p,
.sm-card-foot,
.sm-toast {
  color: #475569;
}

.sm-hero-desc {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.75;
}

.sm-main {
  display: grid;
  gap: 40px;
}

.sm-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sm-editor-card,
.sm-feature-card,
.sm-faq-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.05);
}

.sm-editor-card {
  padding: 18px;
}

.sm-card-head,
.sm-actions,
.sm-card-foot {
  display: flex;
  align-items: center;
}

.sm-card-head,
.sm-card-foot {
  justify-content: space-between;
  gap: 12px;
}

.sm-card-head {
  margin-bottom: 14px;
}

.sm-card-head h2,
.sm-feature-section h2,
.sm-faq-section h2 {
  margin: 0;
  font-size: 1.1rem;
}

.sm-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.sm-btn {
  border: 1px solid #d6deea;
  border-radius: 12px;
  padding: 10px 14px;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s ease;
}

.sm-btn:hover {
  border-color: #bfd0ea;
  transform: translateY(-1px);
}

.sm-btn-primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.sm-btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.sm-btn-ghost {
  background: #f8fafc;
}

.sm-textarea {
  width: 100%;
  min-height: 360px;
  resize: vertical;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  padding: 18px;
  font: inherit;
  font-size: 14px;
  line-height: 1.72;
  color: #0f172a;
  background: #fcfdff;
  outline: none;
}

.sm-textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.sm-output {
  background: #ffffff;
}

.sm-card-foot {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.6;
}

.sm-feature-section,
.sm-faq-section {
  display: grid;
  gap: 18px;
}

.sm-section-desc {
  margin: -8px 0 0;
  font-size: 15px;
}

.sm-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.sm-feature-card,
.sm-faq-item {
  padding: 22px;
}

.sm-feature-card h3,
.sm-faq-item h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.sm-feature-card p,
.sm-faq-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
}

.sm-faq-list {
  display: grid;
  gap: 14px;
}

.sm-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sm-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 980px) {
  .sm-editor-grid,
  .sm-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .sm-page {
    padding: 22px 14px 56px;
  }

  .sm-card-head,
  .sm-card-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .sm-textarea {
    min-height: 280px;
  }
}
