:root {
  --cp-ink: #173f35;
  --cp-ink-soft: #526b63;
  --cp-coral: #ef746f;
  --cp-coral-dark: #d95f5b;
  --cp-mint: #dff4e4;
  --cp-mint-soft: #edf8f0;
  --cp-ivory: #fffaf2;
  --cp-line: #e7ded2;
  --cp-shadow: 0 18px 48px rgba(23, 63, 53, .08);
}

html { scroll-behavior: smooth; }
body { background: var(--cp-ivory); color: var(--cp-ink); }

/* Header: keep the logo and navigation calm, clear and brand-led. */
.f-header { border-bottom: 1px solid rgba(23, 63, 53, .07); }
.f-header__logo img { max-height: 58px; width: auto; }
.f-header a { text-underline-offset: 5px; }

/* Homepage hero: faster first impression and a tighter mobile story. */
.template-home .f-slideshow-section,
.template-home .f-slideshow-section .f-slide { background: var(--cp-ivory); }
.template-home .f-slideshow-section .f-slide__title,
.template-home .f-slideshow-section .f-slide__subtitle,
.template-home .f-slideshow-section .f-slide__description,
.template-home .f-slideshow-section .f-button {
  opacity: 1 !important;
  visibility: visible !important;
}
.template-home .f-slideshow-section .f-slide__content {
  max-width: 750px;
}
.template-home .f-slideshow-section .f-slide__title {
  text-wrap: balance;
  font-size: clamp(42px, 4vw, 58px) !important;
  line-height: 1.06 !important;
  letter-spacing: -.035em !important;
  color: var(--cp-ink) !important;
}
.template-home .f-slideshow-section .f-slide__description {
  max-width: 600px;
  color: var(--cp-ink) !important;
  line-height: 1.68 !important;
}
.template-home .f-iwt--home .f-richtext {
  border: 1px solid rgba(23, 63, 53, .06);
  box-shadow: var(--cp-shadow);
}
.template-home .f-icon-box--home .f-icon-box__inner {
  border: 1px solid rgba(23, 63, 53, .07);
  box-shadow: 0 8px 24px rgba(23, 63, 53, .05);
}
.template-home .f-icon-box--home .f-icon-box__content { max-width: 28ch; margin-inline: auto; }
.template-home .f-custom-blog-post .f-article-card {
  border: 1px solid rgba(23, 63, 53, .07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.template-home .f-custom-blog-post .f-article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(23, 63, 53, .12);
}

/* Custom-page system: compact title area, stronger hierarchy, readable measure. */
body.template-page .main-page {
  background:
    radial-gradient(circle at 8% 7%, rgba(223, 244, 228, .55), transparent 18rem),
    var(--cp-ivory);
}
body.template-page .main-page .f-page-header {
  box-sizing: border-box;
  padding: 34px 20px 30px !important;
  background: linear-gradient(180deg, rgba(223, 244, 228, .62), rgba(255, 250, 242, .2));
  border-bottom: 1px solid rgba(23, 63, 53, .06);
}
body.template-page .main-page .f-page-header__title {
  margin: 0 !important;
  color: var(--cp-ink) !important;
  font-size: clamp(34px, 4vw, 48px) !important;
  line-height: 1.12 !important;
  letter-spacing: -.025em !important;
  text-wrap: balance;
}
body.template-page .main-page .f-breadcrumb {
  margin-top: 8px !important;
  color: var(--cp-ink-soft) !important;
  font-size: 14px !important;
}
body.template-page .main-page .f-page-content.rte {
  box-sizing: border-box;
  width: min(1120px, calc(100% - 40px)) !important;
  max-width: 1120px !important;
  margin-inline: auto !important;
  padding: 38px 0 76px !important;
  font-size: 17px !important;
  line-height: 1.78 !important;
}
body.template-page .main-page .f-page-content.rte > h2:first-of-type {
  margin-top: 0 !important;
  max-width: 900px;
  font-size: clamp(34px, 4vw, 48px) !important;
  line-height: 1.15 !important;
  letter-spacing: -.03em !important;
  text-wrap: balance;
}
body.template-page .main-page .f-page-content.rte > h2:not(:first-of-type) {
  max-width: 880px;
  margin-top: 56px !important;
  font-size: clamp(28px, 3vw, 38px) !important;
  text-wrap: balance;
}
body.template-page .main-page .f-page-content.rte > p,
body.template-page .main-page .f-page-content.rte > .cp-lead {
  max-width: 860px !important;
}
body.template-page .main-page .f-page-content.rte > .cp-lead {
  color: var(--cp-ink) !important;
  font-size: clamp(18px, 1.7vw, 22px) !important;
  line-height: 1.65 !important;
}
body.template-page .main-page .cp-kicker,
body.template-page .main-page .cp-status {
  border: 1px solid rgba(23, 63, 53, .06);
  box-shadow: 0 5px 16px rgba(23, 63, 53, .05);
}
body.template-page .main-page .cp-grid {
  gap: 22px !important;
  margin: 30px 0 46px !important;
}
body.template-page .main-page .cp-card {
  border-color: var(--cp-line) !important;
  border-radius: 26px !important;
  padding: 27px !important;
  box-shadow: var(--cp-shadow) !important;
  transition: transform .2s ease, box-shadow .2s ease;
}
body.template-page .main-page .cp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 52px rgba(23, 63, 53, .12) !important;
}
body.template-page .main-page .cp-note {
  border: 1px solid rgba(23, 63, 53, .06);
  border-radius: 28px !important;
  padding: 28px 32px !important;
}
body.template-page .main-page .cp-plan {
  position: relative;
  margin: 14px 0 !important;
  padding: 22px 24px 22px 28px !important;
  overflow: hidden;
  border: 1px solid var(--cp-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 28px rgba(23, 63, 53, .055);
}
body.template-page .main-page .cp-plan::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(var(--cp-coral), #f7c86f);
}
body.template-page .main-page .cp-scene {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  max-width: 1120px !important;
  height: auto !important;
  max-height: 590px;
  margin: 28px 0 38px !important;
  object-fit: cover !important;
  border: 1px solid var(--cp-line);
  border-radius: 30px !important;
  box-shadow: var(--cp-shadow);
  background: var(--cp-mint-soft);
}
body.template-page .main-page .cp-demo {
  border-radius: 30px !important;
  box-shadow: var(--cp-shadow);
}

@media (max-width: 767px) {
  .f-header__logo img { max-height: 44px; }
  .template-home .f-slideshow-section,
  .template-home .f-slideshow-section .f-slide { height: auto !important; min-height: 0 !important; }
  .template-home .f-slideshow-section .f-slide__media { height: auto !important; aspect-ratio: 16 / 9; }
  .template-home .f-slideshow-section .f-slide__media img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
  .template-home .f-slideshow-section .f-slide__wrapper {
    box-sizing: border-box;
    height: auto !important;
    min-height: 0 !important;
    padding: 18px 15px 26px !important;
  }
  .template-home .f-slideshow-section .f-slide__content {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 24px 20px !important;
    border: 1px solid rgba(23, 63, 53, .07);
    border-radius: 24px;
    background: rgba(255, 255, 255, .82) !important;
    box-shadow: 0 12px 32px rgba(23, 63, 53, .07);
  }
  .template-home .f-slideshow-section .f-slide__title {
    font-size: clamp(31px, 9vw, 38px) !important;
    line-height: 1.12 !important;
  }
  .template-home .f-slideshow-section .f-slide__description {
    font-size: 16px !important;
    line-height: 1.62 !important;
  }
  .template-home .f-iwt--home .f-richtext { padding: 24px !important; border-radius: 24px; }
  .template-home .f-icon-box--home { margin-inline: 10px !important; border-radius: 24px !important; }
  .template-home .f-icon-box--home .f-icon-box__inner { padding: 24px !important; }

  body.template-page .main-page .f-page-header { padding: 24px 18px 20px !important; }
  body.template-page .main-page .f-page-header__title { font-size: 32px !important; }
  body.template-page .main-page .f-page-content.rte {
    width: min(100% - 30px, 1120px) !important;
    padding: 28px 0 56px !important;
    font-size: 16px !important;
  }
  body.template-page .main-page .f-page-content.rte > h2:first-of-type {
    font-size: clamp(28px, 8vw, 34px) !important;
  }
  body.template-page .main-page .f-page-content.rte > h2:not(:first-of-type) {
    margin-top: 44px !important;
    font-size: 27px !important;
  }
  body.template-page .main-page .cp-grid,
  body.template-page .main-page .cp-grid.two { gap: 14px !important; margin: 22px 0 36px !important; }
  body.template-page .main-page .cp-card { padding: 22px !important; border-radius: 22px !important; }
  body.template-page .main-page .cp-note { padding: 22px !important; border-radius: 22px !important; }
  body.template-page .main-page .cp-plan { padding: 19px 18px 19px 23px !important; }
  body.template-page .main-page .cp-scene { margin: 22px 0 30px !important; border-radius: 22px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
