/* Responsive rules (tablet and phone) */
@media (max-width: 800px) {
  .cz {
    grid-template-columns: 1fr;
  }
  .g3 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1000px) {
  .g5 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 700px) {
  .g5 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 800px) {
  .hg {
    grid-template-columns: 1fr;
  }
  .layout,
  .pd,
  .two,
  .split,
  footer .fg {
    grid-template-columns: 1fr;
  }
  .buy {
    position: static;
  }
  .hero {
    padding: 60px 0 100px;
  }
  .stats div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* =====================================================================
   Phone layout (up to 700px wide)
   ===================================================================== */
@media (max-width: 700px) {
  .wrap {
    padding: 0 18px;
  }
  section {
    padding: 44px 0;
  }
  .sh {
    margin-bottom: 20px;
  }
  .page {
    padding: 30px 0 32px;
  }
  .page h1 {
    font-size: 28px;
  }

  /* home */
  .hero {
    padding: 44px 0 84px;
  }
  .hero h1 {
    font-size: 36px;
  }
  .hero p {
    font-size: 16px;
  }
  .hero .row .btn {
    flex: 1 1 auto;
    text-align: center;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    margin-top: -50px;
  }
  .stats div {
    padding: 16px 10px;
    border-right: 0;
    border-bottom: 0;
  }
  .stats div:nth-child(odd) {
    border-right: 1px solid var(--line);
  }
  .stats div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .stats b {
    font-size: 26px;
  }

  /* tiles (categories, topics, research areas) */
  .grid {
    gap: 14px;
  }
  .tile {
    min-height: 150px;
    padding: 18px;
    border-radius: 12px;
  }
  .tile .dot {
    width: 30px;
    height: 30px;
  }
  .tile h3 {
    font-size: 17px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .tile p {
    font-size: 13px;
  }
  .tile .soonb {
    font-size: 10px;
    padding: 4px 9px;
    top: 10px;
    right: 10px;
  }
  .g5 {
    gap: 12px;
  }
  .g5 .tile {
    min-height: 130px;
  }

  /* cards, product page */
  .cb {
    padding: 16px;
  }
  .pd {
    gap: 20px;
  }
  .pd .pimg {
    height: 240px !important;
  }
  .buy {
    padding: 18px;
  }
  td,
  th {
    padding: 10px 12px;
    font-size: 14px;
  }
  .cta {
    padding: 26px 22px;
    border-radius: 14px;
  }
  .cta h2 {
    font-size: 22px;
  }
  .cta .row {
    width: 100%;
  }
  .cta .btn {
    flex: 1 1 auto;
    text-align: center;
  }
  .steps {
    gap: 16px;
  }
  .step:before {
    font-size: 26px;
  }

  /* forms */
  .form {
    padding: 18px;
    gap: 12px;
  }
  .cz {
    gap: 18px;
  }
  /* Customize: show the live preview above the form, smaller */
  #prev {
    order: -1;
    position: static !important;
    padding: 14px !important;
  }
  #esvg {
    max-height: 220px !important;
  }

  /* consultancy quick-start buttons */
  .chip {
    font-size: 13px;
    padding: 8px 13px;
  }

  /* footer: logo on top, the two link columns side by side */
  footer {
    padding: 36px 0 24px;
  }
  footer .fg {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  footer .fg > div:first-child {
    grid-column: 1 / -1;
  }
  footer .lg img {
    height: 70px;
  }
}

@media (max-width: 400px) {
  .hq {
    padding: 8px 11px;
    font-size: 13px;
  }
  .logo img {
    height: 40px;
  }
  .hero h1 {
    font-size: 32px;
  }
}