:root {
  --bg: #f6f9fc;
  --bg-2: #eef5fb;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --surface-soft: #eff6fc;
  --text: #113564;
  --text-soft: #5c7691;
  --text-faint: #84a0bb;
  --line: rgba(17, 53, 100, 0.1);
  --blue: #0b4ea2;
  --teal: #1394b8;
  --green: #88c925;
  --lime: #cddd34;
  --navy: #0f2e57;
  --shadow: 0 18px 50px rgba(14, 44, 84, 0.1);
  --shadow-strong: 0 24px 70px rgba(14, 44, 84, 0.14);
  --radius: 28px;
  --radius-sm: 18px;
  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 6% 14%, rgba(11, 78, 162, 0.10), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(205, 221, 52, 0.18), transparent 20%),
    radial-gradient(circle at 76% 28%, rgba(19, 148, 184, 0.14), transparent 18%),
    linear-gradient(180deg, #f9fbfe 0%, #f6f9fc 38%, #eef5fb 100%);
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.site-shell { min-height: 100vh; }
.site-main { min-height: 60vh; }
.container { width: min(calc(100% - 40px), var(--container)); margin: 0 auto; }
.container.slim { width: min(calc(100% - 40px), 860px); }
.text-accent { color: var(--teal); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(11, 78, 162, 0.10);
  box-shadow: 0 6px 20px rgba(14, 44, 84, 0.04);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(246, 249, 252, 0.76);
  border-bottom: 1px solid rgba(17, 53, 100, 0.08);
}
.nav-wrap {
  position: relative;
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  margin-right: auto;
  text-decoration: none;
}
.brand-logo { height: 54px; width: auto; }
.brand-wordmark { font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  transition: .2s ease;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: var(--blue);
  background: rgba(255, 255, 255, 0.86);
}
.site-nav .button.is-active {
  background: linear-gradient(135deg, var(--blue), var(--teal) 58%, var(--green));
  color: #fff !important;
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(17, 53, 100, 0.08);
  background: rgba(255, 255, 255, 0.72);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--blue);
  display: block;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary {
  color: #fff !important;
  background: linear-gradient(135deg, var(--blue), var(--teal) 58%, var(--green));
  box-shadow: 0 18px 40px rgba(19, 148, 184, 0.22);
}
.button-secondary {
  color: var(--blue) !important;
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(11, 78, 162, 0.12);
}

.hero,
.section-page-hero,
.section-post-hero {
  position: relative;
  overflow: clip;
}
.hero-home { padding: 56px 0 36px; }
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr .95fr;
  gap: 28px;
  align-items: center;
}
.hero-splash {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 42%;
  background:
    url('../brand/cih-splash.jpeg') center top / cover no-repeat,
    radial-gradient(circle at 50% 30%, rgba(205, 221, 52, 0.18), transparent 40%);
  opacity: .65;
  pointer-events: none;
  mask-image: linear-gradient(to left, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
}
.hero-copy,
.hero-panel { position: relative; z-index: 1; }
.hero h1,
.page-title,
.section-heading h2 {
  margin: 0;
  font-size: clamp(36px, 5.5vw, 62px);
  line-height: .95;
  letter-spacing: -0.05em;
  font-weight: 800;
}
.page-title { font-size: clamp(38px, 5vw, 64px); }
.section-heading h2 { font-size: clamp(30px, 4vw, 54px); }
.hero-lead,
.page-lead,
.section-heading p {
  margin: 20px 0 0;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.65;
  color: var(--text-soft);
  max-width: 760px;
}
.hero-actions,
.footer-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero-panel {
  display: grid;
  gap: 18px;
}

.stat-card,
.page-card,
.post-card,
.feature-figure,
.membership-tier {
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.76));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.stat-card,
.membership-tier { padding: 28px; }
.stat-card-feature {
  background:
    radial-gradient(circle at 100% 0%, rgba(19, 148, 184, 0.20), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(238,245,251,0.92));
}
.stat-card-accent,
.membership-tier-featured {
  background:
    radial-gradient(circle at 90% 16%, rgba(205, 221, 52, 0.24), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(239,247,255,0.88));
}
.stat-label,
.meta-row {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: .16em;
}
.stat-card strong,
.membership-tier h3 {
  display: block;
  margin-top: 12px;
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: -0.04em;
}
.stat-card p,
.membership-tier p,
.post-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}
.membership-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.section { position: relative; padding: 36px 0 84px; }
.section-page-hero,
.section-post-hero { padding-top: 56px; padding-bottom: 28px; }
.page-splash {
  position: absolute;
  top: 0;
  right: 0;
  width: min(48vw, 640px);
  height: 100%;
  background:
    url('../brand/cih-mark.png') right 20px top 20px / 280px auto no-repeat,
    radial-gradient(circle at 85% 24%, rgba(136, 201, 37, 0.16), transparent 24%),
    radial-gradient(circle at 70% 6%, rgba(19, 148, 184, 0.12), transparent 18%);
  opacity: .45;
  pointer-events: none;
}
.section-page-hero-membership .page-splash { opacity: .55; }
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
  margin-bottom: 30px;
}
.section-heading p { max-width: 540px; margin: 0; font-size: 18px; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.post-card {
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}
.post-card-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.post-card-media img,
.post-card-media-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.post-card-media-placeholder {
  background:
    radial-gradient(circle at 20% 30%, rgba(11, 78, 162, 0.14), transparent 22%),
    radial-gradient(circle at 80% 20%, rgba(205, 221, 52, 0.22), transparent 24%),
    linear-gradient(135deg, #f1f6fb, #e8f2f9);
}
.post-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}
.post-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.post-card h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.06;
  letter-spacing: -0.04em;
}
.pill {
  display: inline-flex;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: rgba(11, 78, 162, 0.08);
  padding: 8px 10px;
  border-radius: 999px;
}

.page-card {
  padding: clamp(26px, 4vw, 44px);
}
.feature-figure {
  overflow: hidden;
  margin: 0 0 24px;
}
.feature-figure img { width: 100%; height: auto; }

.gh-content {
  font-size: 18px;
  line-height: 1.8;
  color: #1d426f;
}
.gh-content > *:first-child { margin-top: 0; }
.gh-content > *:last-child { margin-bottom: 0; }
.gh-content h2,
.gh-content h3,
.gh-content h4 {
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 1.8em 0 .6em;
}
.gh-content h2 { font-size: clamp(28px, 4vw, 42px); }
.gh-content h3 { font-size: clamp(24px, 3vw, 32px); }
.gh-content h4 { font-size: clamp(20px, 2.5vw, 24px); }
.gh-content p,
.gh-content ul,
.gh-content ol { margin: 0 0 1.2em; }
.gh-content ul,
.gh-content ol { padding-left: 1.2em; }
.gh-content li { margin: 0 0 .5em; }
.gh-content a { color: var(--blue); text-decoration-thickness: 2px; }
.gh-content img {
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(14, 44, 84, 0.10);
}
.gh-content blockquote {
  margin: 1.5em 0;
  padding: 20px 24px;
  border-left: 4px solid var(--teal);
  background: rgba(19, 148, 184, 0.06);
  border-radius: 0 18px 18px 0;
}
.gh-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}
.gh-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255,255,255,0.84);
}
.gh-content th,
.gh-content td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(17, 53, 100, 0.08);
}
.gh-content th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--teal);
}
.gh-content .kg-callout-card,
.gh-content .kg-card.kg-callout-card {
  border-radius: 20px;
  border: 1px solid rgba(17, 53, 100, 0.08);
  background: rgba(255,255,255,0.84);
  box-shadow: 0 12px 30px rgba(14, 44, 84, 0.08);
}
.gh-content .kg-button-card .kg-btn,
.gh-content .kg-button-card a.kg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 700;
}
code {
  background: rgba(17, 53, 100, 0.06);
  border: 1px solid rgba(17, 53, 100, 0.08);
  padding: 1px 6px;
  border-radius: 8px;
  font-size: .94em;
}
pre code {
  display: block;
  padding: 18px;
  overflow-x: auto;
}

/* Insights search and filter */
.insights-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.insights-search-wrap { flex: 1; min-width: 200px; max-width: 360px; }
.insights-search {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(17,53,100,0.10);
  background: rgba(255,255,255,0.8);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.insights-search:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11,78,162,0.08);
}
.insights-search::placeholder { color: var(--text-faint); }
.insights-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.insights-tag {
  appearance: none;
  border: 1px solid rgba(17,53,100,0.10);
  background: rgba(255,255,255,0.6);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
}
.insights-tag:hover { border-color: var(--blue); color: var(--blue); }
.insights-tag.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.insights-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-soft);
  font-size: 16px;
}
.insights-empty a { color: var(--blue); }
@media (max-width: 680px) {
  .insights-controls { flex-direction: column; align-items: stretch; }
  .insights-search-wrap { max-width: none; }
}

.footer-cta {
  position: relative;
  overflow: hidden;
  padding: 48px 0;
}
.footer-cta-splash {
  position: absolute;
  inset: 0;
  background: url('../brand/cih-splash.jpeg') center / cover no-repeat;
  opacity: .10;
  pointer-events: none;
}
.footer-cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(9,44,95,0.96), rgba(18,132,154,0.92) 58%, rgba(136,201,37,0.88));
  color: #fff;
  box-shadow: 0 25px 60px rgba(11, 78, 162, 0.22);
}
.footer-cta-inner-centered {
  text-align: center;
  flex-direction: column;
}
.footer-cta-inner h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: .98;
  letter-spacing: -0.05em;
}
.footer-cta-inner p {
  max-width: 700px;
  margin: 12px auto 0;
  color: rgba(255,255,255,0.84);
}
.footer-cta .eyebrow {
  color: #fff;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
}
.footer-cta .button-secondary {
  color: #fff !important;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
}

.site-footer {
  padding: 24px 0 48px;
  border-top: 1px solid rgba(17, 53, 100, 0.06);
}
.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  color: var(--text-soft);
  font-size: 14px;
}
.site-footer nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.site-footer a {
  text-decoration: none;
  color: var(--text-soft);
}
.site-footer a:hover { color: var(--blue); }

/* Ghost width classes */
.kg-width-wide { margin-left: -80px; margin-right: -80px; }
.kg-width-full { margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); }

@media (max-width: 1100px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .hero-grid,
  .section-heading,
  .footer-cta-inner,
  .site-footer-inner {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hero-grid { gap: 20px; }
  .hero-panel,
  .membership-grid {
    grid-template-columns: 1fr;
  }
  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 20px;
    right: 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(17,53,100,0.08);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 14px; }
  .kg-width-wide { margin-left: 0; margin-right: 0; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 24px), var(--container)); }
  .hero-home { padding-top: 34px; }
  .post-grid,
  .membership-grid { grid-template-columns: 1fr; }
  .brand-logo { height: 46px; }
  .page-card,
  .stat-card,
  .membership-tier,
  .footer-cta-inner { border-radius: 22px; }
  .gh-content { font-size: 17px; }
  .page-splash {
    width: 100%;
    background-size: 190px auto;
    background-position: right 10px top 12px;
  }
}


/* v10 page cleanup: let custom HTML page packs control the hero/title area */
.section-page-content-standalone {
  padding: 28px 0 72px;
}

.page-card-standalone {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.page-card-standalone > .kg-card:first-child,
.page-card-standalone > .gh-content > .kg-card:first-child {
  margin-top: 0;
}

.page-card-standalone .cih-wrap {
  width: 100%;
  max-width: none;
  padding-top: 0;
}

.page-card-standalone .cih-shell {
  border-radius: 34px;
}

.page-card-standalone .cih-link,
.page-card-standalone a[href^="mailto:"] {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-card-standalone .cih-line-row > div:last-child {
  min-width: 0;
  flex: 1 1 auto;
}

.page-card-standalone .cih-line-row a,
.page-card-standalone .cih-line-row .cih-small {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-card-standalone .kg-width-wide,
.page-card-standalone .kg-width-full {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 820px) {
  .section-page-content-standalone {
    padding-top: 20px;
  }
}
