:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1c1f24;
  --muted: #667085;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --success: #159947;
  --border: #e4e7ec;
  --highlight: #fff7df;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: var(--accent); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 19px;
  font-weight: 800;
  text-decoration: none;
}

.logo img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.topbar nav a:hover { color: var(--text); }

main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 24px 88px;
}

.hero {
  text-align: center;
  padding: 22px 0 12px;
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto 18px;
  font-size: 40px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.lead {
  max-width: 760px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 18px;
}

.hero-meta {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.product-snapshot {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 920px;
  margin: 34px auto 0;
  text-align: left;
}

.snapshot-stat {
  min-height: 112px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.snapshot-stat span,
.snapshot-stat small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.snapshot-stat strong {
  display: block;
  margin: 8px 0 2px;
  color: var(--text);
  font-size: 28px;
  line-height: 1.1;
}

.snapshot-stat.warning {
  border-color: #f6d77a;
  background: #fffaf0;
}

.badge-free,
.price-tag,
.project-tag,
.download-tag {
  display: inline-block;
  border-radius: 999px;
  font-weight: 700;
}

.badge-free {
  margin-bottom: 16px;
  padding: 6px 14px;
  background: #e9f9ef;
  color: #087a35;
  font-size: 13px;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.cta.big {
  min-height: 52px;
  padding: 14px 28px;
  font-size: 16px;
}

.cta.primary {
  background: var(--accent);
  color: #fff;
}

.cta.primary:hover { background: var(--accent-dark); }

.cta.ghost {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border);
}

section { margin-top: 64px; }
section h2 { margin: 0 0 24px; font-size: 28px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.problems .grid,
.features .grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.problem h3 {
  font-size: 16px;
  line-height: 1.35;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.price-card .price {
  margin: 6px 0 12px;
  color: var(--text);
  font-size: 31px;
  font-weight: 800;
}

.price-card .cta { margin-top: auto; }
.price-card.highlight {
  background: var(--highlight);
  border-color: #f6d77a;
}

.price-card.free-card {
  background: #f0fdf4;
  border-color: #b7e7c4;
}

.price-tag {
  position: absolute;
  top: -10px;
  right: 16px;
  padding: 4px 12px;
  background: var(--success);
  color: #fff;
  font-size: 12px;
}

.price-tag.pro { background: #d97706; }

.check-list {
  margin: 12px 0 20px;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 4px 0 4px 24px;
  color: var(--muted);
  font-size: 14px;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 4px;
  color: var(--success);
  font-weight: 800;
}

.small { font-size: 13px; }
.muted { color: var(--muted); }

.faq {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.faq details {
  margin-bottom: 8px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.faq p {
  margin: 12px 0 0;
  color: var(--muted);
}

.result {
  max-width: 820px;
  margin: 0 auto;
}

.result h1 {
  margin: 0 0 12px;
  font-size: 32px;
}

.download-list,
.projects-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.download-item,
.project-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.download-item h2,
.project-item h2 {
  margin: 6px 0 8px;
  font-size: 20px;
}

.download-item p,
.project-item p {
  margin: 0 0 10px;
  color: var(--muted);
}

.download-tag,
.project-tag {
  padding: 3px 9px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
}

.download-meta {
  color: var(--muted);
  font-size: 13px;
}

.empty-state,
.note-block {
  padding: 22px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.note-block {
  margin-top: 32px;
  border-style: solid;
  border-left: 3px solid #d97706;
  background: #fffbeb;
}

.legal-content {
  width: min(840px, calc(100vw - 48px));
  max-width: 840px;
  margin: 0 auto;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.legal-content h1 {
  margin-top: 0;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.2;
}
.legal-content h2 { margin-top: 32px; font-size: 21px; }
.legal-content p,
.legal-content li { color: #3f4652; }

.legal-content > * {
  max-width: 100%;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}

.legal-table th,
.legal-table td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  width: 34%;
  background: #f8fafc;
  color: var(--text);
}

footer {
  padding: 32px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

footer p { margin: 4px 0; }
.legal-links a { text-decoration: none; }

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 20px;
  }

  .topbar nav {
    width: 100%;
    gap: 8px 14px;
    overflow-x: visible;
    padding-bottom: 2px;
  }

  .topbar nav a {
    font-size: 13px;
  }

  main { padding: 22px 18px 72px; }
  .legal-content {
    width: calc(100vw - 48px);
    margin: 0 auto;
    padding: 28px 20px;
  }
  .legal-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .legal-content .note-block,
  .legal-content p,
  .legal-content li,
  .legal-content h1,
  .legal-content h2 {
    width: min(100%, 300px);
    max-width: 300px;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .hero { padding-top: 22px; }
  .hero h1 { font-size: 30px; }
  .lead { font-size: 16px; }
  .hero-meta {
    max-width: 310px;
    margin-left: auto;
    margin-right: auto;
  }
  .product-snapshot {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 24px;
  }
  .snapshot-stat {
    min-height: 98px;
    padding: 14px;
  }
  .snapshot-stat strong {
    font-size: 22px;
  }
  .grid,
  .problems .grid,
  .features .grid {
    grid-template-columns: 1fr;
  }
  .download-item,
  .project-item {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .topbar {
    width: 100%;
    max-width: 390px;
    margin: 0;
    box-sizing: border-box;
  }

  .topbar nav {
    max-width: 340px;
  }

  main {
    width: 100%;
    max-width: 390px;
    margin: 0;
    box-sizing: border-box;
  }

  main.legal-content {
    width: calc(100vw - 48px);
    max-width: calc(100vw - 48px);
    margin: 0 auto 48px;
    padding: 24px 16px;
  }

  .hero h1,
  .legal-content h1,
  .lead,
  .hero-meta,
  section h2,
  .card,
  .download-item,
  .project-item {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero h1 {
    font-size: 28px;
  }

  .cta-row {
    justify-content: stretch;
  }

  .cta-row .cta {
    flex: 1 1 150px;
  }

}
