:root {
  color-scheme: light;
  --bg: #f7f8f4;
  --panel: #ffffff;
  --ink: #16201c;
  --muted: #5c6862;
  --line: #dce2da;
  --accent: #116b5b;
  --accent-2: #c04f2f;
  --gold: #e3b34c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--ink);
  color: white;
  border-radius: 8px;
  font-size: 13px;
}

.nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  max-width: 1180px;
  margin: 10px auto 0;
  min-height: 540px;
  padding: 58px 38px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 8px;
  border: 1px solid var(--line);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(247, 248, 244, .99) 0%, rgba(247, 248, 244, .9) 42%, rgba(247, 248, 244, .3) 78%),
    linear-gradient(180deg, rgba(247, 248, 244, .72), rgba(247, 248, 244, .94));
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-copy {
  max-width: 690px;
}

.hero h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(42px, 5.8vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.trend-search {
  display: flex;
  gap: 8px;
  max-width: 560px;
  margin-top: 22px;
}

.trend-search input {
  min-width: 0;
  flex: 1;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .86);
  color: var(--ink);
  font: inherit;
}

.trend-search button {
  height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 520px;
}

.metric {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 14px;
}

.metric strong {
  display: block;
  font-size: 26px;
}

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

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px;
}

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

.section-head h2,
.offer-box h2 {
  margin: 0;
  font-size: 26px;
}

.eyebrow {
  display: block;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

.compact-grid .card {
  min-height: 220px;
}

.card,
.offer-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.card-media,
.article-visual {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 22%, rgba(227, 179, 76, .95), transparent 18%),
    radial-gradient(circle at 82% 26%, rgba(192, 79, 47, .85), transparent 16%),
    linear-gradient(135deg, #17332c, #eef3ee);
}

.card-media.has-image {
  background: #dfe6e1;
}

.card-media img,
.article-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-media {
  height: 126px;
  margin: -4px -4px 16px;
}

.card-media span,
.article-visual span {
  position: absolute;
  display: block;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(4px);
}

.card-media span:nth-child(1) {
  width: 42%;
  height: 30px;
  left: 18px;
  top: 20px;
  border-radius: 8px;
}

.card-media span:nth-child(2) {
  width: 64%;
  height: 38px;
  right: 18px;
  bottom: 18px;
  border-radius: 8px;
}

.card-media span:nth-child(3) {
  width: 58px;
  height: 58px;
  right: 28px;
  top: 18px;
  border-radius: 50%;
}

.category-software {
  background:
    radial-gradient(circle at 20% 24%, rgba(60, 120, 190, .9), transparent 17%),
    radial-gradient(circle at 78% 26%, rgba(227, 179, 76, .85), transparent 16%),
    linear-gradient(135deg, #13201c, #eaf1ee);
}

.category-business {
  background:
    radial-gradient(circle at 20% 24%, rgba(192, 79, 47, .92), transparent 18%),
    radial-gradient(circle at 78% 26%, rgba(17, 107, 91, .85), transparent 16%),
    linear-gradient(135deg, #2d2218, #f3eee8);
}

.category-creator-tools {
  background:
    radial-gradient(circle at 20% 24%, rgba(227, 179, 76, .95), transparent 18%),
    radial-gradient(circle at 78% 26%, rgba(61, 131, 119, .85), transparent 16%),
    linear-gradient(135deg, #202319, #f2f0e8);
}

.card:hover,
.offer-card:hover {
  border-color: #a8b4ad;
}

.badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.badge,
.score {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.badge {
  background: #e7f1ee;
  color: var(--accent);
}

.score {
  background: #fff4d8;
  color: #805a00;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.18;
}

.card p,
.offer-card span,
.article-body p {
  color: var(--muted);
}

.article-body h2,
.page h2 {
  margin: 28px 0 8px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.rank-list {
  margin: 10px 0 26px;
  padding-left: 22px;
}

.rank-list li {
  margin: 10px 0;
  color: var(--muted);
}

.rank-list a {
  color: var(--ink);
  font-weight: 800;
}

.rank-list span {
  color: var(--accent);
  font-weight: 800;
}

.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.offer-box {
  max-width: 1180px;
  margin: 16px auto;
  padding: 28px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.offer-card {
  min-height: 150px;
}

.offer-card em {
  margin-top: auto;
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
}

.article {
  max-width: 820px;
  margin: 0 auto;
  padding: 42px 20px;
}

.article-visual {
  height: 260px;
  margin-bottom: 28px;
}

.article-photo {
  height: 360px;
  margin: 0 0 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #dfe6e1;
}

.article-visual span:nth-child(1) {
  width: 220px;
  height: 54px;
  left: 32px;
  top: 38px;
  border-radius: 8px;
}

.article-visual span:nth-child(2) {
  width: 320px;
  height: 74px;
  right: 34px;
  bottom: 36px;
  border-radius: 8px;
}

.article-visual span:nth-child(3) {
  width: 110px;
  height: 110px;
  right: 82px;
  top: 34px;
  border-radius: 50%;
}

.article-visual span:nth-child(4) {
  width: 46%;
  height: 1px;
  left: 15%;
  bottom: 78px;
  background: rgba(255, 255, 255, .45);
}

.article h1 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.article-meta {
  color: var(--muted);
  font-size: 14px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.button.secondary {
  background: var(--ink);
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 42px 20px;
}

.site-footer {
  align-items: flex-start;
  border-top: 1px solid var(--line);
  margin-top: 36px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .site-header,
  .site-footer,
  .section-head {
    display: block;
  }

  .nav,
  .site-footer nav {
    margin-top: 16px;
  }

  .metrics,
  .grid,
  .offer-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 34px 20px 18px;
    margin-left: 12px;
    margin-right: 12px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(247, 248, 244, .98) 0%, rgba(247, 248, 244, .9) 48%, rgba(247, 248, 244, .45) 100%);
  }

  .hero h1 {
    font-size: 36px;
    line-height: 1.02;
  }

  .hero p {
    font-size: 16px;
  }

  .trend-search {
    display: block;
    margin-top: 18px;
  }

  .trend-search input {
    width: 100%;
  }

  .trend-search button {
    width: 100%;
    margin-top: 8px;
  }

  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
    margin-top: 14px;
  }

  .metric {
    padding: 10px 9px;
    min-height: 78px;
  }

  .metric strong {
    font-size: 24px;
  }

  .metric span {
    font-size: 11px;
  }

  .article-photo {
    height: 220px;
  }
}
