* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #f7fbff;
  color: #101828;
  font-family: Tahoma, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", Arial, sans-serif;
}

/* Soft background decoration */
body:before {
  content: "";
  position: fixed;
  left: -120px;
  top: 120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(107, 190, 255, .14);
  z-index: -1;
}

body:after {
  content: "";
  position: fixed;
  right: -130px;
  top: 320px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 142, 202, .13);
  z-index: -1;
}

a {
  -webkit-tap-highlight-color: transparent;
}

/* Header */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid #e8edf5;
  box-shadow: 0 4px 14px rgba(16, 24, 40, .05);
}

.topbar-inner {
  width: 94%;
  max-width: 1380px;
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: #101828;
  font-size: 1.65rem;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: -1px;
  white-space: nowrap;
}

.brand span {
  color: #2563eb;
}

.topnav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.topnav a {
  color: #101828;
  text-decoration: none;
  font-weight: 800;
  font-size: .98rem;
}

.topnav a:first-child {
  color: #2563eb;
}

/* Main */
.page {
  width: 94%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 38px 0 40px;
}

/* Hero */
.hero {
  text-align: center;
  margin: 6px auto 28px;
}

.hero-mark {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #2563eb;
  background: #eef4ff;
  font-size: .9rem;
  font-weight: 900;
}

.hero h1 {
  margin: 0;
  color: #101828;
  font-size: 3.6rem;
  line-height: 1.12;
  letter-spacing: -2px;
  font-weight: 900;
}

.hero p {
  margin: 14px auto 0;
  max-width: 760px;
  color: #475467;
  font-size: 1.1rem;
  line-height: 1.9;
}

/* Section title */
.section-title {
  margin: 0 0 18px;
  color: #101828;
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 900;
}

.section-title:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 32px;
  margin-right: 12px;
  border-radius: 999px;
  background: #ffd21f;
  vertical-align: -7px;
}

.section-title.center {
  text-align: center;
}

.section-title.center:before {
  display: none;
}

/* Highlight cards */
.highlight-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
}

.tool-card {
  display: block;
  width: calc(25% - 20px);
  margin: 0 10px 20px;
  overflow: hidden;
  color: #101828;
  text-decoration: none;
  background: #fff;
  border-radius: 22px;
  border: 1px solid #e8edf5;
  box-shadow: 0 10px 24px rgba(16, 24, 40, .08);
  transition: transform .18s ease, box-shadow .18s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(16, 24, 40, .13);
}

.tool-image {
  height: 168px;
  overflow: hidden;
  background: #edf4ff;
}

.tool-image img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  display: block;
  border: 0;
}

.tool-body {
  position: relative;
  min-height: 138px;
  padding: 30px 20px 20px;
  background: #fff;
}

.tool-icon {
  position: absolute;
  left: 20px;
  top: -26px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: block;
  text-align: center;
  line-height: 44px;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(16, 24, 40, .18);
  border: 4px solid #fff;
}

.tool-body h3 {
  margin: 0 0 8px;
  font-size: 1.16rem;
  line-height: 1.4;
  font-weight: 900;
}

.tool-body p {
  margin: 0;
  color: #475467;
  font-size: 1.12rem;
  line-height: 1.9;
}

/* Icon colors */
.purple { background: #8b5cf6; }
.orange { background: #f59e0b; }
.green { background: #22c55e; }
.blue { background: #2563eb; }
.teal { background: #14b8a6; }
.violet { background: #6366f1; }
.pink { background: #ec4899; }

/* Ad */
.ad-banner {
  position: relative;
  margin: 28px auto;
  max-width: 980px;
  min-height: 92px;
  border-radius: 20px;
  text-align: center;
  padding: 20px 60px;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: hidden;
}

.ad-banner strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1.2;
  font-weight: 900;
  color: transparent;
}

.ad-banner span {
  display: block;
  margin-top: 5px;
  color: transparent;
  line-height: 1.5;
}

.ad-banner small {
  display: none;
}

/* Categories */
.category-section {
  margin-top: 26px;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -9px;
}

.category-card {
  width: calc(20% - 18px);
  margin: 0 9px 18px;
  background: #fff;
  border-radius: 22px;
  padding: 20px;
  border: 1px solid #e8edf5;
  box-shadow: 0 10px 24px rgba(16, 24, 40, .07);
}

.category-card h3 {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.22rem;
  line-height: 1.25;
  font-weight: 900;
}

.cat-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-block;
  text-align: center;
  line-height: 36px;
  color: #fff;
  font-weight: 900;
  flex: 0 0 36px;
}

.category-card a {
  display: block;
  padding: 8px 0 8px 20px;
  color: #344054;
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.6;
  position: relative;
}

.category-card a:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  position: absolute;
  left: 2px;
  top: 17px;
  background: currentColor;
  opacity: .65;
}

.category-card a:hover {
  color: #2563eb;
}

.finance h3 { color: #22c55e; }
.finance .cat-icon { background: #22c55e; }

.health h3 { color: #8b5cf6; }
.health .cat-icon { background: #8b5cf6; }

.life h3 { color: #f59e0b; }
.life .cat-icon { background: #f59e0b; }

.invest h3 { color: #2563eb; }
.invest .cat-icon { background: #2563eb; }

.network h3 { color: #ec4899; }
.network .cat-icon { background: #ec4899; }

/* Footer */
.footer-main {
  width: 94%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #667085;
  font-size: 1rem;
  border-top: 1px solid #e8edf5;
}

.footer-main span:first-child {
  font-weight: 900;
  color: #101828;
}

/* Tablet */
@media (max-width: 1099px) {
  .hero h1 {
    font-size: 3rem;
  }

  .tool-card {
    width: calc(50% - 20px);
  }

  .category-card {
    width: calc(50% - 18px);
  }

  .category-card a {
    font-size: 1.12rem;
    line-height: 1.75;
  }

  .tool-image,
  .tool-image img {
    height: 190px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .topbar-inner {
    width: 92%;
    min-height: 64px;
  }

  .brand {
    font-size: 1.3rem;
  }

  .topnav a:not(:first-child) {
    display: none;
  }

  .topnav a {
    font-size: 1rem;
  }

  .page {
    width: 92%;
    padding-top: 24px;
  }

  .hero {
    margin-bottom: 22px;
  }

  .hero h1 {
    font-size: 1.6rem;
    letter-spacing: -1px;
  }

  .hero p {
    font-size: 1.2rem;
    line-height: 1.75;
  }

  .section-title {
    font-size: 1.8em;
  }

  .highlight-grid,
  .category-grid {
    margin-left: 0;
    margin-right: 0;
  }

  .tool-card {
    width: 100%;
    margin: 0 0 16px;
    border-radius: 18px;
  }

  .tool-image,
  .tool-image img {
    height: 190px;
  }

  .tool-body {
    min-height: auto;
    padding: 28px 16px 18px;
  }

  .tool-body h3 {
    font-size: 1.28rem;
    line-height: 1.45;
  }

  .tool-body p {
    font-size: 1.18rem;
    line-height: 1.9;
  }

  .ad-banner {
    margin: 22px auto;
    padding: 18px 38px;
  }

  .ad-banner strong {
    font-size: 1.35rem;
  }

  .category-card {
    width: 100%;
    margin: 0 0 16px;
    border-radius: 18px;
    padding: 22px;
    font-size: 1.3rem;
    line-height: 1.8;
  }

  .category-card h3 {
    font-size: 1.55rem;
    line-height: 1.35;
  }

  .category-card a {
    font-size: 1.16rem;
    line-height: 1.8;
  }

  .footer-main {
    flex-direction: column;
    width: 92%;
    font-size: 1.1rem;
  }
}