:root {
  --csm-shadow: 0 18px 55px rgba(16, 30, 56, 0.09);
  --csm-border: 1px solid rgba(82, 97, 118, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { text-underline-offset: 0.18em; }

:focus-visible {
  outline: 3px solid #38cff5;
  outline-offset: 3px;
}

.csm-site-header {
  position: relative;
  z-index: 20;
  border-bottom: var(--csm-border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.csm-header-inner { min-height: 82px; }

.csm-brand .wp-block-site-title {
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
}

.csm-brand .wp-block-site-title a { color: #0b1220; text-decoration: none; }
.csm-brand .wp-block-site-tagline { margin: 0.3rem 0 0; color: #526176; font-size: 0.78rem; line-height: 1.2; }

.csm-header-nav { font-size: 0.92rem; font-weight: 650; }
.csm-header-nav a { color: #101e38; text-decoration: none; }
.csm-header-nav a:hover { color: #2764ff; }

.csm-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.csm-hero::before,
.csm-hero::after {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  content: "";
  filter: blur(1px);
  opacity: 0.5;
}

.csm-hero::before {
  top: -12rem;
  right: -8rem;
  width: 34rem;
  height: 34rem;
  background: radial-gradient(circle, rgba(56, 207, 245, 0.3), transparent 67%);
}

.csm-hero::after {
  bottom: -15rem;
  left: 15%;
  width: 30rem;
  height: 30rem;
  background: radial-gradient(circle, rgba(39, 100, 255, 0.28), transparent 68%);
}

.csm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  color: #38cff5;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.csm-kicker::before { width: 1.8rem; height: 2px; background: currentColor; content: ""; }
.csm-hero h1 { max-width: 930px; margin-bottom: 1.3rem; color: #fff; }
.csm-hero-copy { max-width: 720px; color: #cbd7e8; font-size: clamp(1.08rem, 2vw, 1.35rem); }

.csm-button-secondary .wp-block-button__link {
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: transparent;
  color: #fff;
}

.csm-button-secondary .wp-block-button__link:hover { border-color: #38cff5; background: rgba(56, 207, 245, 0.08); }

.csm-trust-row { color: #aebbd0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.csm-section-label { color: #2764ff; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.csm-section-heading { max-width: 780px; }
.csm-section-intro { max-width: 680px; color: #526176; }

.csm-card,
.csm-feature-card,
.csm-topic-card {
  height: 100%;
  overflow: hidden;
  border: var(--csm-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 30, 56, 0.03);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.csm-card:hover,
.csm-feature-card:hover,
.csm-topic-card:hover {
  transform: translateY(-3px);
  border-color: rgba(39, 100, 255, 0.38);
  box-shadow: var(--csm-shadow);
}

.csm-card .wp-block-post-featured-image,
.csm-feature-card .wp-block-post-featured-image { overflow: hidden; aspect-ratio: 2.15 / 1; margin: 0; background: #e8eef7; }
.csm-card .wp-block-post-featured-image img,
.csm-feature-card .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.csm-card:hover .wp-block-post-featured-image img,
.csm-feature-card:hover .wp-block-post-featured-image img { transform: scale(1.025); }

.csm-card-body { padding: clamp(1rem, 2vw, 1.35rem); }
.csm-post-meta { color: #526176; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.035em; text-transform: uppercase; }
.csm-post-meta a { text-decoration: none; }
.csm-card .wp-block-post-title a,
.csm-feature-card .wp-block-post-title a { color: #0b1220; text-decoration: none; }
.csm-card .wp-block-post-title { margin-top: 0.65rem; margin-bottom: 0.65rem; font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.22; }
.csm-card .wp-block-post-title a:hover,
.csm-feature-card .wp-block-post-title a:hover { color: #2764ff; }
.csm-card .wp-block-post-excerpt { margin-top: 0; color: #526176; font-size: 0.91rem; line-height: 1.55; }
.csm-card .wp-block-post-excerpt__excerpt { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.csm-card .wp-block-post-excerpt__more-link { font-weight: 750; text-decoration: none; }

.csm-feature-card { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.csm-feature-card:not(:has(.wp-block-post-featured-image)) { display: block; }
.csm-feature-card:not(:has(.wp-block-post-featured-image)) .csm-card-body { max-width: 820px; min-height: 250px; }
.csm-feature-card .wp-block-post-featured-image { aspect-ratio: auto; min-height: 275px; max-height: 320px; }
.csm-feature-card .csm-card-body { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 3vw, 2.5rem); }
.csm-feature-card .wp-block-post-title { margin-top: 0.75rem; margin-bottom: 0.75rem; font-size: clamp(1.55rem, 2.8vw, 2.2rem) !important; line-height: 1.12; }
.csm-feature-card .wp-block-post-excerpt { margin-top: 0; color: #526176; font-size: 0.96rem; line-height: 1.55; }
.csm-feature-card .wp-block-post-excerpt__excerpt { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

.csm-topic-card { padding: clamp(1.4rem, 3vw, 2rem); }
.csm-topic-number { color: #2764ff; font-family: var(--wp--preset--font-family--mono); font-size: 0.78rem; font-weight: 700; }

.csm-newsletter { position: relative; overflow: hidden; border-radius: 22px; }
.csm-newsletter::after { position: absolute; right: -7rem; bottom: -9rem; width: 22rem; height: 22rem; border: 1px solid rgba(56, 207, 245, 0.3); border-radius: 50%; content: ""; }

.csm-article-shell { padding-top: clamp(3rem, 7vw, 6rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.csm-article-header { max-width: 920px; }
.csm-article-header .wp-block-post-title { margin-bottom: 1.2rem; font-size: clamp(2.35rem, 5.5vw, 4.75rem); }
.csm-article-deck { color: #526176; font-size: 1.16rem; }
.csm-article-meta { color: #526176; font-size: 0.86rem; font-weight: 650; }
.csm-article-meta a { text-decoration: none; }

.csm-article-content { font-size: clamp(1rem, 1.5vw, 1.09rem); }
.csm-article-content > h2 { margin-top: 2.7em; }
.csm-article-content > h3 { margin-top: 2.1em; }
.csm-article-content > p:first-child { font-size: 1.18em; }
.csm-article-content li + li { margin-top: 0.55em; }
.csm-article-content blockquote { margin: 2rem 0; padding: 0.5rem 0 0.5rem 1.5rem; border-left: 4px solid #2764ff; color: #334259; }
.csm-article-content figure.wp-block-table { max-width: 100%; overflow-x: auto; border: var(--csm-border); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.csm-article-content table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 0.9rem; line-height: 1.45; }
.csm-article-content th { background: #101e38; color: #fff; text-align: left; }
.csm-article-content th,
.csm-article-content td { padding: 0.85rem 1rem; border: 1px solid #dce4ef; vertical-align: top; }
.csm-article-content tbody tr:nth-child(even) { background: #f4f7fb; }

.csm-source-note { padding: 1.2rem 1.35rem; border-left: 4px solid #38cff5; background: #f4f7fb; color: #334259; font-size: 0.9rem; }
.csm-post-terms a { display: inline-block; margin: 0 0.45rem 0.45rem 0; padding: 0.35rem 0.7rem; border-radius: 999px; background: #e8eef7; color: #334259; font-size: 0.78rem; text-decoration: none; }

.csm-author-box { border: var(--csm-border); border-radius: 18px; background: #f4f7fb; }
.csm-author-box .wp-block-avatar img { border-radius: 50%; }

.csm-pagination .page-numbers { padding: 0.45rem 0.7rem; border-radius: 8px; text-decoration: none; }
.csm-pagination .current { background: #2764ff; color: #fff; }

.csm-site-footer { color: #aebbd0; }
.csm-site-footer a { color: #dce7f7; }
.csm-site-footer .wp-block-site-title a { color: #fff; text-decoration: none; }
.csm-footer-rule { border-color: rgba(255,255,255,0.13); }

@media (max-width: 800px) {
  .csm-header-inner { min-height: 70px; }
  .csm-brand { min-width: 0; max-width: calc(100vw - 92px); }
  .csm-brand .wp-block-site-title { font-size: clamp(1rem, 5vw, 1.3rem); white-space: normal; overflow-wrap: anywhere; }
  .csm-brand .wp-block-site-tagline { display: none; }
  .csm-header-nav { flex-shrink: 0; }
  .csm-feature-card { display: block; }
  .csm-feature-card .wp-block-post-featured-image { min-height: auto; aspect-ratio: 2 / 1; }
  .csm-article-content table { min-width: 720px; }
}

@media (max-width: 600px) {
  .csm-site-header .wp-block-group.alignwide,
  .csm-hero .wp-block-group.alignwide,
  .csm-section-wrap { padding-right: 1.1rem !important; padding-left: 1.1rem !important; }
  .csm-brand .wp-block-site-title { max-width: 245px; font-size: 1.05rem; line-height: 1.15; }
  .csm-hero { padding-top: 4rem !important; padding-bottom: 4rem !important; }
  .csm-hero h1 { font-size: clamp(2.35rem, 13vw, 3.6rem) !important; }
  .csm-card-grid { grid-template-columns: 1fr !important; }
  .csm-article-shell { padding-top: 2.5rem; }
  .csm-article-header .wp-block-post-title { font-size: clamp(2rem, 10.5vw, 3rem); }
  .csm-article-content { font-size: 1rem; }
  .csm-author-box > .wp-block-group { align-items: flex-start !important; }
}

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