/*
Theme Name:   Counselor Divi Child
Theme URI:    https://counselormagazine.com
Description:  Divi 5 child theme for Counselor Magazine. Carries the sitewide design system (navy/blue editorial language derived from the member login page), the ported login-page CSS (previously in Mag Plus Customizer Additional CSS, which does NOT transfer between themes), and utility classes used by Divi Theme Builder templates.
Author:       Counselor Magazine
Template:     Divi
Version:      1.9.4
*/

/* =====================================================
   1. DESIGN TOKENS
   ===================================================== */
:root {
  --cm-navy: #16283a;
  --cm-navy-deep: #0a1624;
  --cm-ink: #17293b;
  --cm-blue: #2371b1;
  --cm-blue-light: #3390d6;
  --cm-blue-dark: #17527f;
  --cm-slate: #46586b;
  --cm-muted: #5a6b7d;
  --cm-body: #33465a;
  --cm-bg: #f7f9fc;
  --cm-card: #ffffff;
  --cm-line: #d5dde6;
  --cm-line-soft: #e6ecf3;
  --cm-warm: #d97544;
  --cm-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --cm-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --cm-r-lg: 18px;
  --cm-r-md: 12px;
  --cm-r-sm: 10px;
  --cm-shadow-lg: 0 30px 70px rgba(6,18,32,.16), 0 4px 14px rgba(6,18,32,.08);
  --cm-shadow-md: 0 14px 34px rgba(6,18,32,.10), 0 2px 8px rgba(6,18,32,.06);
  --cm-shadow-sm: 0 4px 14px rgba(6,18,32,.07);
  --cm-focus-ring: 0 0 0 4px rgba(35,113,177,.16);
}

/* =====================================================
   2. BASE EDITORIAL STYLES
   ===================================================== */
body { background: var(--cm-bg); }

h1, h2, h3, .cm-serif {
  font-family: var(--cm-serif);
  color: var(--cm-navy);
  letter-spacing: -.2px;
}

/* Focus visibility site-wide */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: none;
  box-shadow: var(--cm-focus-ring);
  border-radius: 4px;
}

/* =====================================================
   3. UTILITY CLASSES (apply via Divi module CSS Class field)
   ===================================================== */
.cm-kicker {
  display: inline-block;
  font-family: var(--cm-sans);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e6f0f9;
  color: var(--cm-blue-dark);
}
.cm-kicker--warm  { background: #fbeee6; color: #b25a33; }
.cm-kicker--green { background: #e4f2ea; color: #2e6d4d; }
.cm-kicker--glass {
  background: rgba(255,255,255,.16);
  color: #dcebf7;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.22);
}

.cm-card {
  background: var(--cm-card);
  border: 1px solid var(--cm-line-soft);
  border-radius: var(--cm-r-lg);
  box-shadow: var(--cm-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.cm-card:hover { transform: translateY(-4px); box-shadow: var(--cm-shadow-md); }

.cm-btn,
.cm-btn.et_pb_button {
  display: inline-block;
  padding: 12px 22px !important;
  border-radius: var(--cm-r-sm) !important;
  font-weight: 700 !important;
  font-size: 14.5px !important;
  letter-spacing: .02em;
  color: #fff !important;
  background: linear-gradient(180deg, var(--cm-blue-light) 0%, var(--cm-blue) 100%) !important;
  border: 0 !important;
  box-shadow: 0 8px 20px rgba(35,113,177,.38);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.cm-btn:hover,
.cm-btn.et_pb_button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(35,113,177,.45);
}
.cm-btn--ghost,
.cm-btn--ghost.et_pb_button {
  color: var(--cm-blue) !important;
  background: transparent !important;
  border: 1.5px solid var(--cm-line) !important;
  box-shadow: none;
}
.cm-btn--ghost:hover { border-color: var(--cm-blue) !important; background: #fff !important; }

.cm-panel-navy {
  background: linear-gradient(135deg, var(--cm-navy-deep) 0%, var(--cm-navy) 55%, #1d3a55 100%);
  border-radius: var(--cm-r-lg);
  color: #fff;
  box-shadow: var(--cm-shadow-md);
}
.cm-panel-navy h2, .cm-panel-navy h3 { color: #fff; }
.cm-panel-navy p { color: #b7cadc; }

.cm-ad-slot {
  border: 1.5px dashed var(--cm-line);
  border-radius: var(--cm-r-md);
  background: #fbfcfe;
}

.cm-rise { animation: cmRiseIn .5s cubic-bezier(.2,.7,.3,1) both; }
@keyframes cmRiseIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* Uppercase micro-label (form labels, section eyebrows) */
.cm-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cm-slate);
}

/* Editorial inputs */
.cm-input,
.cm-scope input[type="text"],
.cm-scope input[type="email"],
.cm-scope input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 15px;
  font-size: 15px;
  color: var(--cm-ink);
  background: #f7f9fc;
  border: 1.5px solid var(--cm-line);
  border-radius: var(--cm-r-sm);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.cm-input:focus,
.cm-scope input:focus {
  border-color: var(--cm-blue);
  background: #fff;
  box-shadow: var(--cm-focus-ring);
}

/* =====================================================
   3b. GLOBAL HEADER (Theme Builder header layout)
   -----------------------------------------------------
   Structure (Divi Theme Builder, header area .et-l--header):
     Row 1: .cm-utility-bar  → Top Menu + social icons
     Row 2: masthead         → logo + Main Menu (sibling of utility row)
   ===================================================== */

/* V2 "navy monolith" header.
   Structure: Row1 .cm-utility-bar | Row2 masthead (logo + subscribe)
   | Row3 nav bar (Main Menu).
   The header pins at top:0 and SHRINKS on scroll (utility bar collapses,
   logo + CTA scale down) — a negative top offset instead sliced the
   masthead in half and clipped the logo and buttons. */
.et-l--header {
  position: sticky;
  top: 0;
  z-index: 500;
}
.et-l--header .et_pb_section {
  background:
    radial-gradient(90% 140% at 85% -20%, rgba(51,144,214,.28) 0%, transparent 55%),
    radial-gradient(70% 120% at 8% 110%, rgba(232,164,95,.12) 0%, transparent 60%),
    linear-gradient(175deg, #060e18 0%, var(--cm-navy-deep) 45%, var(--cm-navy) 100%);
  box-shadow: 0 20px 50px rgba(2,8,16,.35);
  padding: 0;
}

/* --- Utility bar (transparent over the section gradient) --- */
.et-l--header .cm-utility-bar {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 4px 4vw;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  min-height: 40px;
}
.et-l--header .cm-utility-bar .et_pb_menu,
.et-l--header .cm-utility-bar .et_pb_menu__wrap { background: transparent; }
/* Divi regenerates per-page module CSS (menu modules default to a WHITE
   background) with instance-specific selectors on some page types —
   force every header menu transparent so the navy always wins. */
.et-l--header .et_pb_menu,
.et-l--header .et_pb_menu__wrap,
.et-l--header .et_pb_menu__menu,
.et-l--header .et_pb_menu .et_pb_menu_inner_container { background: transparent !important; }
.et-l--header .cm-utility-bar .et_pb_menu li a {
  color: #a8bccf;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .03em;
  padding: 6px 10px;
  transition: color .15s ease;
}
.et-l--header .cm-utility-bar .et_pb_menu li a:hover { color: #fff; opacity: 1; }
.et-l--header .cm-utility-bar .et_pb_social_media_follow { margin-bottom: 0; text-align: right; }
.et-l--header .cm-utility-bar .et_pb_social_media_follow li a.icon {
  width: 26px; height: 26px;
  background: transparent !important;
}
.et-l--header .cm-utility-bar .et_pb_social_media_follow li a.icon::before {
  width: 26px; height: 26px; line-height: 26px; font-size: 13px;
  color: #a8bccf; transition: color .15s ease;
}
.et-l--header .cm-utility-bar .et_pb_social_media_follow li a.icon:hover::before { color: #fff; }

/* --- Masthead row (logo left, Subscribe CTA right) --- */
.et-l--header .cm-utility-bar + .et_pb_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px;
  padding: 26px 32px 20px;
  margin: 0 auto;
}
.et-l--header .cm-utility-bar + .et_pb_row .et_pb_image { margin-bottom: 0; }

/* Real Counselor logo (transparent PNG) on the navy masthead */
.et-l--header .cm-utility-bar + .et_pb_row .et_pb_image img {
  max-width: 380px;
  height: auto;
  filter: brightness(1.12) saturate(1.05) drop-shadow(0 4px 18px rgba(2,8,16,.45));
}

/* ---- SHRINK-ON-SCROLL ----
   body.cm-scrolled is toggled by a tiny listener in the child theme.
   Everything animates to a compact bar: utility strip collapses to
   nothing, the logo scales down, the CTA tightens. Nothing is ever
   clipped, so the logo and buttons stay whole at any scroll position. */
.et-l--header .cm-utility-bar,
.et-l--header .cm-utility-bar + .et_pb_row,
.et-l--header .cm-utility-bar + .et_pb_row .et_pb_image img,
.et-l--header .et_pb_button,
.et-l--header .cm-login-link {
  transition: max-height .3s ease, min-height .3s ease, padding .3s ease,
              opacity .25s ease, max-width .3s ease, font-size .3s ease;
}
body.cm-scrolled .et-l--header .cm-utility-bar {
  min-height: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  overflow: hidden;
  border-bottom-color: transparent;
  pointer-events: none;
}
body.cm-scrolled .et-l--header .cm-utility-bar + .et_pb_row {
  padding-top: 10px;
  padding-bottom: 8px;
}
body.cm-scrolled .et-l--header .cm-utility-bar + .et_pb_row .et_pb_image img {
  max-width: 215px;
}
body.cm-scrolled .et-l--header .et_pb_button {
  padding: 9px 17px !important;
  font-size: 12.5px !important;
}
body.cm-scrolled .et-l--header .cm-login-link { font-size: 13px; }
/* tighter nav strip once compact */
body.cm-scrolled .et-l--header .cm-utility-bar ~ .et_pb_row:last-of-type { padding-top: 2px; padding-bottom: 2px; }
/* a hair more shadow when floating over content */
body.cm-scrolled .et-l--header .et_pb_section { box-shadow: 0 14px 40px rgba(2,8,16,.5); }
@media (prefers-reduced-motion: reduce) {
  .et-l--header .cm-utility-bar,
  .et-l--header .cm-utility-bar + .et_pb_row,
  .et-l--header .cm-utility-bar + .et_pb_row .et_pb_image img,
  .et-l--header .et_pb_button { transition: none; }
}


/* Masthead right side: login link + subscribe button on one line */
.et-l--header .cm-utility-bar + .et_pb_row > .et_pb_column:last-child {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}
.et-l--header .cm-utility-bar + .et_pb_row > .et_pb_column:last-child > * {
  width: auto;
  flex: 0 0 auto;
  margin-bottom: 0;
}
.et-l--header .cm-utility-bar + .et_pb_row .et_pb_code { margin-bottom: 0; order: -1; }
.et-l--header .cm-login-link {
  color: #b9cde0;
  font-size: 14.5px;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.et-l--header .cm-login-link:hover {
  color: #fff;
  border-color: var(--cm-blue-light);
}

/* Subscribe button — glow gradient */
.et-l--header .et_pb_button,
.et-l--header .et_pb_button_module_wrapper .et_pb_button {
  display: inline-block;
  padding: 13px 26px !important;
  border-radius: 11px !important;
  font-weight: 800 !important;
  font-size: 14.5px !important;
  letter-spacing: .02em;
  color: #fff !important;
  background: linear-gradient(180deg, var(--cm-blue-light) 0%, var(--cm-blue) 100%) !important;
  border: 0 !important;
  box-shadow: 0 10px 28px rgba(51,144,214,.45), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.et-l--header .et_pb_button:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 16px 36px rgba(51,144,214,.55);
  background-image: linear-gradient(180deg, var(--cm-blue-light) 0%, var(--cm-blue) 100%) !important;
}

/* --- Nav bar row (Main Menu on its own dark glass line) --- */
.et-l--header .cm-utility-bar ~ .et_pb_row:last-of-type {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 4vw;
  background: rgba(6,14,24,.86);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,.06);
}
.et-l--header .cm-utility-bar ~ .et_pb_row:last-of-type .et_pb_menu { background: transparent; }
.et-l--header .cm-utility-bar ~ .et_pb_row:last-of-type .et_pb_menu > * li a { white-space: nowrap; }
.et-l--header .cm-utility-bar ~ .et_pb_row:last-of-type .et_pb_menu li a {
  position: relative;
  font-size: 14.5px;
  font-weight: 650;
  color: #c3d4e4;
  padding: 19px 16px;
  transition: color .15s ease;
}
/* Underline animation lives on the <li> so the <a>'s ::after stays
   free for Divi's dropdown arrow / our HOT badge. */
.et-l--header .cm-utility-bar ~ .et_pb_row:last-of-type .et_pb_menu > * > nav > ul > li {
  position: relative;
}
.et-l--header .cm-utility-bar ~ .et_pb_row:last-of-type .et_pb_menu > * > nav > ul > li::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--cm-blue-light), #8fc3e8);
  transform: scaleX(0);
  transition: transform .22s cubic-bezier(.2,.7,.3,1);
  pointer-events: none;
}
.et-l--header .cm-utility-bar ~ .et_pb_row:last-of-type .et_pb_menu li a:hover {
  color: #fff;
  opacity: 1;
}
.et-l--header .cm-utility-bar ~ .et_pb_row:last-of-type .et_pb_menu > * > nav > ul > li:hover::after {
  transform: scaleX(1);
}

/* Dropdown arrows: replace Divi's absolutely-positioned ETmodules
   glyph with the draft's inline triangle. */
.et-l--header .et_pb_menu li.menu-item-has-children > a::after {
  content: '\25BE' !important;
  font-family: var(--cm-sans) !important;
  position: static !important;
  display: inline-block !important;
  font-size: 10px;
  line-height: 1;
  margin-left: 6px;
  opacity: .55;
  vertical-align: 2px;
  transform: none !important;
  transition: opacity .15s ease;
}
.et-l--header .et_pb_menu li.menu-item-has-children > a:hover::after { opacity: .9; }

/* HOT badge on Job Board — matches the draft chip.
   Targeted by destination URL so it works on any environment
   (menu item IDs differ between staging and live). */
.et-l--header .cm-utility-bar ~ .et_pb_row .et_pb_menu li > a[href*="jobs.counselormagazine"]::after {
  content: 'HOT';
  display: inline-block;
  font-family: var(--cm-sans);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  color: #1a0e04;
  background: linear-gradient(180deg, #f2c078, var(--cm-warm));
  border-radius: 4px;
  padding: 2.5px 6px;
  margin-left: 7px;
  vertical-align: 2px;
}

/* --- Dropdown panels — dark editorial cards --- */
.et-l--header .et_pb_menu li ul,
.et-l--header .et_pb_menu .sub-menu {
  background: linear-gradient(180deg, #0d1a2a 0%, #111f31 100%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  box-shadow: 0 40px 80px rgba(2,8,16,.55);
  padding: 12px 10px;
  min-width: 240px;
}
.et-l--header .et_pb_menu li ul li a {
  font-size: 13.5px;
  font-weight: 550;
  color: #c3d4e4;
  padding: 10px 14px;
  border-radius: 9px;
  width: 100%;
  transition: all .15s ease;
}
.et-l--header .et_pb_menu li ul li a:hover {
  background: rgba(51,144,214,.14);
  color: #fff;
  padding-left: 20px;
}

/* Hide global header entirely on the member login page
   (login keeps its full-bleed branded backdrop) */
.cm-login .et-l--header { display: none; }

/* Divi renders the TB body layout as a flex child of #main-content;
   without this it shrinks to content width and the backdrop only
   covers part of the viewport. */
.cm-login #main-content > .et-l--body { width: 100%; flex: 1 1 100%; }

/* --- Responsive: header --- */
@media (max-width: 980px) {
  .et-l--header { top: 0; }
  .et-l--header .cm-utility-bar { padding: 4px 16px; }
  .et-l--header .cm-utility-bar ~ .et_pb_row { padding: 10px 16px; flex-wrap: wrap; }
  .et-l--header .cm-utility-bar ~ .et_pb_row .et_pb_image img { max-width: 210px; }
}
@media (max-width: 640px) {
  /* keep utility bar to a single tidy line; menu handles its own
     mobile hamburger via Divi */
  .et-l--header .cm-utility-bar .et_pb_menu li a { padding: 4px 6px; font-size: 11.5px; }
}

/* =====================================================
   4. MEMBER LOGIN PAGE (ported from Mag Plus Customizer CSS)
   -----------------------------------------------------
   NOTE: Customizer "Additional CSS" (wp_custom_css) is stored
   PER-THEME and does not follow you to Divi. This section is the
   permanent home of the login page design. Page ID 2753 matches
   both live and staging (staging is a clone).
   Mag Plus-specific selectors (.tt-*) removed; Divi templates
   handle chrome visibility instead.
   ===================================================== */
.cm-login #main-content,
.cm-login .cm-login-backdrop {
  min-height: 100vh;
  background: var(--cm-navy) var(--cm-login-bg-image, none) center / cover no-repeat;
  display: flex;
  align-items: center;
  position: relative;
}
.cm-login #main-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(10,22,36,.6) 0%, rgba(10,22,36,.2) 45%, rgba(10,22,36,0) 75%);
  pointer-events: none;
}
.cm-login .cm-login-card,
.cm-login .accessally-login-form-container {
  position: relative;
  width: 100%;
  max-width: 432px;
  margin-left: 5vw;
  padding: 40px 38px 28px;
  background: rgba(255,255,255,.97);
  border-radius: var(--cm-r-lg);
  box-shadow: 0 30px 70px rgba(6,18,32,.4), 0 4px 14px rgba(6,18,32,.2);
  backdrop-filter: blur(6px);
  animation: cmRiseIn .5s cubic-bezier(.2,.7,.3,1) both;
}

/* Labels */
.cm-login .accessally-login-form label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cm-slate);
}

/* Inputs */
.cm-login #accessally-login-form-username-1,
.cm-login #accessally-login-form-password-1,
.cm-login .accessally-login-reset-login-input,
.cm-login .accessally-login-one-use-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 18px;
  padding: 12px 15px;
  font-size: 15px;
  color: var(--cm-ink);
  background: #f7f9fc;
  border: 1.5px solid var(--cm-line);
  border-radius: var(--cm-r-sm);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.cm-login #accessally-login-form-username-1:focus,
.cm-login #accessally-login-form-password-1:focus,
.cm-login .accessally-login-reset-login-input:focus,
.cm-login .accessally-login-one-use-input:focus {
  border-color: var(--cm-blue);
  background: #fff;
  box-shadow: var(--cm-focus-ring);
}

/* Remember me */
.cm-login #accessally-login-form-rememberme-1 {
  width: auto;
  display: inline-block;
  margin: 0 8px 0 0;
  accent-color: var(--cm-blue);
  vertical-align: middle;
}
.cm-login #accessally-login-form-rememberme-1 + label {
  display: inline;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--cm-muted);
  vertical-align: middle;
}

/* Buttons */
body.cm-login .accessally-login-form-submit-button,
body.cm-login .accessally-login-reset-login-submit,
body.cm-login .accessally-login-one-use-submit {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  margin: 6px 0 18px;
  padding: 13px 18px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff !important;
  background: linear-gradient(180deg, var(--cm-blue-light) 0%, var(--cm-blue) 100%) !important;
  border: 0 !important;
  border-radius: var(--cm-r-sm) !important;
  text-transform: none !important;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(35,113,177,.38);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
body.cm-login .accessally-login-form-submit-button:hover,
body.cm-login .accessally-login-reset-login-submit:hover,
body.cm-login .accessally-login-one-use-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(35,113,177,.45);
}
body.cm-login .accessally-login-form-submit-button:active { transform: none; filter: brightness(.98); }

/* Links */
body.cm-login .accessally-login-form a,
body.cm-login .accessally-login-reset-container a,
body.cm-login .accessally-login-one-use-container a {
  color: var(--cm-blue) !important;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: color .15s ease;
}
body.cm-login .accessally-login-form a:hover,
body.cm-login .accessally-login-reset-container a:hover,
body.cm-login .accessally-login-one-use-container a:hover {
  color: var(--cm-blue-dark) !important;
  text-decoration: underline !important;
}

/* Helper copy in reset + snappy panels */
.cm-login .accessally-login-reset-container,
.cm-login .accessally-login-one-use-container {
  font-size: 14.5px;
  line-height: 1.65;
  color: #4d5f70;
}

/* Bottom links row: side by side */
body.cm-login .accessally-login-form tr:last-child {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
body.cm-login .accessally-login-form tr:last-child td { width: auto !important; }

/* Centered, clickable logo */
.cm-login .cm-login-logo {
  display: block;
  width: 100%;
  max-width: 300px;
  height: 52px;
  margin: 0 auto 24px;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

/* Mobile */
@media (max-width: 640px) {
  .cm-login .cm-login-card,
  .cm-login .accessally-login-form-container {
    max-width: none;
    margin: 0 16px;
    padding: 30px 22px 20px;
  }
}

/* =====================================================
   5. LOGIN PAGE EXTRAS — password eye + register button
   ===================================================== */
.cm-login .cm-eye {
  position: absolute;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
  color: #8fa0b1;
  transition: color .15s ease;
}
.cm-login .cm-eye:hover,
.cm-login .cm-eye.is-on { color: var(--cm-blue); }

body.cm-login a.cm-register-btn,
.cm-login .cm-register-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 18px;
  padding: 12px 18px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--cm-blue) !important;
  background: transparent;
  border: 1.5px solid var(--cm-line);
  border-radius: var(--cm-r-sm);
  text-decoration: none !important;
  transition: border-color .15s ease, background .15s ease;
}
.cm-login .cm-register-btn:hover {
  border-color: var(--cm-blue);
  background: #f2f7fc;
}


/* =====================================================
   6. LOGIN PAGE LAYOUT — match live counselormagazine.com/login
   (branded photo backdrop, white card) + current-cover panel
   ===================================================== */
/* spacer section from template: hide */
.cm-login .et-l--body .et_pb_section:first-child:not(:only-child) { display: none; }

/* full-bleed branded backdrop */
.cm-login .et-l--body .et_pb_section:last-child {
  min-height: 100vh;
  /* custom-painted navy watercolor backdrop — ships inside the theme */
  background: #16283a url('assets/login-bg.jpg') center / cover no-repeat;
  display: flex;
  align-items: center;
  position: relative;
  padding: 48px 0;
}
.cm-login .et-l--body .et_pb_section:last-child::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(10,22,36,.6) 0%, rgba(10,22,36,.2) 45%, rgba(10,22,36,0) 75%);
  pointer-events: none;
}

/* Divi 5 renders section > row > columns, and the row defaults to
   display:block (columns stack). Turn the row into a centered flex
   band so the card and the cover sit SIDE BY SIDE. */
.cm-login .et-l--body .et_pb_section:last-child > .et_pb_row {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6vw;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
  background: transparent !important;
  position: relative;
}

/* the column holding logo + form becomes the white card */
.cm-login .et-l--body .et_pb_section:last-child .et_pb_column:first-child {
  position: relative;
  width: 100%;
  max-width: 432px;
  flex: 0 0 auto;
  padding: 40px 38px 28px;
  background: rgba(255,255,255,.97);
  border-radius: var(--cm-r-lg);
  box-shadow: 0 30px 70px rgba(6,18,32,.4), 0 4px 14px rgba(6,18,32,.2);
  backdrop-filter: blur(6px);
  animation: cmRiseIn .5s cubic-bezier(.2,.7,.3,1) both;
}
/* logo centered, welcome headline hidden (live has no headline) */
.cm-login .et-l--body .et_pb_image_0_tb_body { text-align: center; margin: 0 0 24px; }
.cm-login .et-l--body .et_pb_image_0_tb_body img { max-width: 300px; height: auto; }
.cm-login .et-l--body .et_pb_text_0_tb_body { display: none; }

/* current-cover panel on the right, floating on the backdrop */
.cm-login .et-l--body .et_pb_section:last-child .et_pb_column:last-child:not(:first-child) {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 360px;
  width: auto;
}
.cm-login .et-l--body .et_pb_section:last-child .et_pb_column:last-child:not(:first-child) .et_pb_code,
.cm-login .et-l--body .et_pb_section:last-child .et_pb_column:last-child:not(:first-child) .et_pb_code_inner {
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
}
.cm-current-cover { display: block; line-height: 0; }
.cm-current-cover .issuem_widget_issue_name { display: none; }
.cm-hide { display: none; }
.cm-current-cover img,
.cm-login .et-l--body .et_pb_image_1_tb_body img {
  width: 300px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 30px 70px rgba(2,8,16,.55);
  transform: rotate(1.5deg);
  transition: transform .3s ease, box-shadow .3s ease;
  animation: cmCoverFloat 6s ease-in-out infinite; /* same gentle float as the homepage hero */
}
.cm-current-cover img:hover,
.cm-login .et-l--body .et_pb_image_1_tb_body img:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 0 40px 90px rgba(2,8,16,.6);
}
@media (prefers-reduced-motion: reduce) {
  .cm-current-cover img { animation: none; }
}

@media (max-width: 900px) {
  .cm-login .et-l--body .et_pb_section:last-child > .et_pb_row { flex-direction: column; gap: 24px; }
  .cm-login .et-l--body .et_pb_section:last-child .et_pb_column:first-child { margin: 24px 0; }
  .cm-login .et-l--body .et_pb_image_1_tb_body,
  .cm-login .cm-current-cover { display: none; }
}


/* login card: flatten the template's inner rows AND inner columns into
   one clean card — Divi 5 gives the inner columns their own white
   background, width and offsets, which reads as a second "ghost" card. */
.cm-login .et-l--body .et_pb_column:first-child .et_pb_row_inner,
.cm-login .et-l--body .et_pb_column:first-child .et_pb_column_inner {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
  position: static !important;
  display: block !important;
}
.cm-login .et-l--body .et_pb_column:first-child .et_pb_module {
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
}
/* the empty row that held the hidden welcome headline */
.cm-login .et-l--body .et_pb_row_inner:has(.et_pb_text_0_tb_body) { display: none !important; }

/* =====================================================
   7. HOMEPAGE — V2 hero band, cards, ads (matches prototype)
   ===================================================== */
.cm-kicker--amber {
  background: linear-gradient(180deg, rgba(232,164,95,.25), rgba(217,117,68,.2));
  color: #f2c078;
  border: 1px solid rgba(232,164,95,.35);
}

/* hero band fuses with the navy header */
.cm-hero-band {
  background:
    radial-gradient(90% 120% at 80% -10%, rgba(51,144,214,.25) 0%, transparent 55%),
    linear-gradient(180deg, var(--cm-navy) 0%, #1d3a55 100%);
  color: #fff;
  padding: 48px 0 64px;
  margin-top: 0;
}
.cm-hero-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: end;
}
.cm-hero-kickers { display: flex; gap: 10px; margin-bottom: 20px; }
.cm-hero-copy h1 {
  font-family: var(--cm-serif);
  font-size: 62px;
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -1px;
  color: #fff;
  margin: 0 0 18px;
  text-wrap: balance;
}
.cm-hero-copy h1 a { color: #fff; }
.cm-hero-copy h1 a:hover { color: #cfe4f5; }
.cm-hero-deck {
  font-family: var(--cm-serif);
  font-style: italic;
  font-size: 18.5px;
  line-height: 1.6;
  color: #b9cde0;
  max-width: 540px;
}
.cm-hero-byline { display: flex; align-items: center; gap: 14px; margin: 26px 0 0; font-size: 14px; }
.cm-hero-byline b { color: #fff; }
.cm-hero-byline span { color: #7f97ac; font-size: 12.5px; }
.cm-hero-read {
  margin-left: auto;
  color: #fff !important;
  font-weight: 700;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: 10px 20px;
  transition: background .2s ease, gap .2s ease;
}
.cm-hero-read:hover { background: rgba(255,255,255,.18); }

/* the animated current cover */
.cm-hero-cover { position: relative; padding-bottom: 0; }
.cm-hero-cover .cm-current-cover { display: block; }
.cm-hero-cover .cm-current-cover img {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 50px 100px rgba(2,8,16,.55);
  transform: rotate(1.5deg);
  transition: transform .3s ease, box-shadow .3s ease;
  animation: cmCoverFloat 6s ease-in-out infinite;
}
.cm-hero-cover .cm-current-cover:hover img {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 60px 110px rgba(2,8,16,.65);
}
@keyframes cmCoverFloat { 50% { translate: 0 -8px; } }
.cm-hero-badge {
  position: absolute;
  left: -18px;
  bottom: 26px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  color: var(--cm-ink);
  border-radius: 16px;
  padding: 13px 17px;
  font-size: 12.5px;
  line-height: 1.35;
  box-shadow: 0 24px 60px rgba(6,18,32,.35);
  animation: cmBadgeFloat 5s ease-in-out infinite;
}
.cm-hero-badge b { font-size: 13px; }
@keyframes cmBadgeFloat { 50% { translate: 0 -7px; } }
.cm-hero-badge__ce {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #f2c078, var(--cm-warm));
  font-weight: 900; color: #2a1608;
}

/* content sections */
.cm-home-inner { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.cm-section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 64px 0 24px; }
.cm-section-head h2 { font-family: var(--cm-serif); font-size: 34px; color: var(--cm-navy); letter-spacing: -.5px; margin: 0; }
.cm-section-head h2 em { font-style: normal; color: var(--cm-blue); }
.cm-section-head a { font-size: 13.5px; font-weight: 800; color: var(--cm-blue); }
.cm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.cm-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cm-section-sub {
  display: inline-block;
  margin-left: 12px;
  font-family: var(--cm-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cm-muted);
}

/* ---- HERO CAROUSEL (rotates the current issue's 4 features) ---- */
.cm-hero-slides { display: grid; }
.cm-hero-slide {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .55s ease, transform .55s ease;
  pointer-events: none;
}
.cm-hero-slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.cm-hero-nav { display: flex; align-items: center; gap: 16px; margin-top: 30px; }
.cm-hero-dots { display: flex; align-items: center; gap: 9px; }
.cm-hero-dot {
  width: 9px; height: 9px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(255,255,255,.28);
  transition: background .2s ease, transform .2s ease, width .2s ease;
}
.cm-hero-dot:hover { background: rgba(255,255,255,.55); }
.cm-hero-dot.is-active { background: var(--cm-blue-light); width: 26px; }
.cm-hero-arrow {
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.07);
  color: #cfe0ef;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.cm-hero-arrow:hover { background: var(--cm-blue); border-color: var(--cm-blue); color: #fff; }

/* ---- COLUMNS SCROLLER (horizontal, scroll-snap) ---- */
.cm-colrow { position: relative; }
.cm-colrow__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cm-colrow__track::-webkit-scrollbar { display: none; }
.cm-colrow .cm-card--col { flex: 0 0 348px; scroll-snap-align: start; }
.cm-colrow__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--cm-line);
  background: rgba(255,255,255,.95);
  color: var(--cm-navy);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(6,18,32,.18);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.cm-colrow__arrow:hover { background: var(--cm-blue); color: #fff; transform: translateY(-50%) scale(1.06); }
.cm-colrow__arrow--prev { left: -18px; }
.cm-colrow__arrow--next { right: -18px; }

.cm-card { background: #fff; border: 1px solid var(--cm-line-soft); border-radius: 20px; overflow: hidden; box-shadow: var(--cm-shadow-sm); transition: transform .22s ease, box-shadow .22s ease; }
.cm-card:hover { transform: translateY(-6px); box-shadow: 0 26px 54px rgba(6,18,32,.14); }
.cm-card__thumb { display: block; height: 185px; position: relative; background: linear-gradient(150deg, #2a4a68, #764e6b); background-size: cover; background-position: center; }
.cm-card__thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10,22,36,.45)); }
.cm-card__cat { position: absolute; z-index: 2; top: 14px; left: 14px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #fff; background: rgba(10,22,36,.55); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.25); padding: 6px 12px; border-radius: 999px; }

/* ---- MAGAZINE HEADER-BAR COLORS (per Counselor Header Bar Color SOP 2026) ----
   Column chips take each column's print header-bar color; feature cards
   take the positional Feature 1-4 colors. Unlisted categories keep the
   default glass chip above. */
/* Same frosted-glass treatment as the default chip (translucent color
   over a blurred backdrop) — the base .cm-card__cat supplies the
   backdrop-filter; these only tint the glass with each bar color. */
.cm-card__cat--letter-from-the-publisher { background: rgba(157,199,59,.62); color: #fff; }
.cm-card__cat--ccapp                     { background: rgba(95,36,159,.62);  color: #fff; }
.cm-card__cat--recovery-capital-peer-support { background: rgba(237,27,47,.62); color: #fff; }
.cm-card__cat--industry-insider          { background: rgba(244,154,193,.62); color: #fff; }
.cm-card__cat--counselor-concerns        { background: rgba(132,41,144,.62); color: #fff; }
.cm-card__cat--nlrc                      { background: rgba(0,174,239,.62);  color: #fff; }
.cm-card__cat--topics-in-behavioral-health-care { background: rgba(53,188,168,.62); color: #fff; }
.cm-card__cat--wellness                  { background: rgba(217,23,109,.62); color: #fff; }
.cm-card--f1 .cm-card__cat { background: rgba(233,193,2,.62);  color: #fff; }
.cm-card--f2 .cm-card__cat { background: rgba(250,157,27,.62); color: #fff; }
.cm-card--f3 .cm-card__cat { background: rgba(230,87,95,.62);  color: #fff; }
.cm-card--f4 .cm-card__cat { background: rgba(0,160,220,.62);  color: #fff; }
.cm-card__cat[class*="cm-card__cat--"],
.cm-card--f1 .cm-card__cat, .cm-card--f2 .cm-card__cat,
.cm-card--f3 .cm-card__cat, .cm-card--f4 .cm-card__cat {
  text-shadow: 0 1px 4px rgba(6,18,32,.45);
}
/* hero kickers carry the same positional feature colors (glass keeps
   its blur from .cm-kicker--glass) */
.cm-hero-slide .cm-kicker--f1 { background: rgba(233,193,2,.4); }
.cm-hero-slide .cm-kicker--f2 { background: rgba(250,157,27,.4); }
.cm-hero-slide .cm-kicker--f3 { background: rgba(230,87,95,.4); }
.cm-hero-slide .cm-kicker--f4 { background: rgba(0,160,220,.4); }
.cm-hero-slide .cm-kicker--f1, .cm-hero-slide .cm-kicker--f2,
.cm-hero-slide .cm-kicker--f3, .cm-hero-slide .cm-kicker--f4 { color: #fff; }
.cm-card__body { padding: 20px 22px 22px; }
.cm-card__body h3 { font-family: var(--cm-serif); font-size: 20px; line-height: 1.3; margin: 0 0 10px; }
.cm-card__body h3 a { color: var(--cm-ink); }
.cm-card__body h3 a:hover { color: var(--cm-blue-dark); }
.cm-card__body p { font-size: 14px; line-height: 1.65; color: var(--cm-muted); margin: 0; }
.cm-card__meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #8195a8; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--cm-line-soft); }
.cm-card__meta b { color: var(--cm-slate); }
.cm-card__mins { margin-left: auto; color: var(--cm-blue); font-weight: 700; }

/* ad slots — centered, capped to natural banner proportions.
   Creatives are uploaded huge (1900px+); constrain every creative to
   billboard scale (max 970 wide / 250 tall, aspect preserved) so ads
   read as ads, not page takeovers. */
.cm-home-ad { max-width: 1240px; margin: 0 auto; padding: 26px 32px; text-align: center; }
.cm-home-ad--top { padding-top: 0; background: transparent; }
.cm-home-ad--bottom { padding: 44px 32px 56px; }
.cm-home-ad img {
  max-width: min(970px, 100%) !important;
  max-height: 250px !important;
  width: auto !important;
  height: auto !important;
  border-radius: 10px;
}
.cm-home-ad iframe,
.cm-home-ad video {
  max-width: min(970px, 100%) !important;
  max-height: 250px !important;
}
.cm-hero-band + .cm-home-inner { margin-top: 8px; }

/* top ad sits on navy (header runs into hero) — give it a navy stage */
.cm-home-ad--top { background: var(--cm-navy); margin: 0; max-width: none; padding: 16px 32px 4px; }

@media (max-width: 1280px) {
  .cm-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1020px) {
  .cm-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .cm-hero-copy h1 { font-size: 40px; }
  .cm-grid-3 { grid-template-columns: 1fr; }
  .cm-hero-cover { max-width: 300px; }
  .cm-hero-badge { left: 8px; }
  .cm-colrow .cm-card--col { flex-basis: 300px; }
  .cm-colrow__arrow--prev { left: 6px; }
  .cm-colrow__arrow--next { right: 6px; }
}
@media (max-width: 640px) {
  .cm-grid-4 { grid-template-columns: 1fr; }
}

/* =====================================================
   7b. HOMEPAGE CANVAS — full-bleed, no boxed row
   The [cm_homepage] Code module lives in a Divi section/row;
   strip their width/padding so the hero band runs edge to edge,
   and paint the page canvas in the design's soft blue-gray.
   ===================================================== */
body.home,
body.home #page-container,
body.home #main-content,
body.home #et-main-area {
  background: var(--cm-bg) !important;
}
body.home .et-l--body .et_pb_section {
  padding: 0 !important;
  background: transparent !important;
  overflow: visible;
}
body.home .et-l--body .et_pb_row {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.home .et-l--body .et_pb_column { width: 100% !important; }
body.home .et-l--body .et_pb_code { margin-bottom: 0 !important; }
body.home .et-l--body .et_pb_code_inner { width: 100%; }

/* hero band: run flush against the header (kill the gap) */
body.home #main-content { padding-top: 0 !important; }
.cm-hero-band { margin-top: 0; }
.cm-home-ad--top { padding-top: 24px; }


/* =====================================================
   8. GLOBAL FOOTER
   ===================================================== */
.cm-footer {
  background:
    radial-gradient(70% 120% at 10% 110%, rgba(51,144,214,.12) 0%, transparent 60%),
    linear-gradient(180deg, #0a1624 0%, #060e18 100%);
  color: #8fa6ba;
  font-size: 14px;
}
.cm-footer__main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 32px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
.cm-footer__brand img { max-width: 300px; height: auto; margin-bottom: 18px; filter: brightness(1.12); }
.cm-footer__brand p { line-height: 1.7; font-size: 13.5px; max-width: 340px; margin: 0; }
.cm-footer h5 {
  color: #fff;
  font-family: var(--cm-sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin: 0 0 16px;
}
.cm-footer ul { list-style: none; margin: 0; padding: 0; }
.cm-footer li { margin-bottom: 10px; padding: 0; }
.cm-footer a { color: #8fa6ba; transition: color .15s ease; }
.cm-footer a:hover { color: #fff; }
.cm-footer__contact li { display: flex; gap: 10px; align-items: baseline; }
.cm-footer__contact .ico { color: var(--cm-blue-light); flex: none; }
.cm-footer__bar {
  border-top: 1px solid rgba(255,255,255,.08);
}
.cm-footer__bar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #64798d;
}
.cm-footer__bar a { color: #8fa6ba; }
@media (max-width: 900px) {
  .cm-footer__main { grid-template-columns: 1fr; gap: 32px; }
}

/* Full-bleed footer: strip Divi's boxed section/row chrome so the navy
   footer runs edge-to-edge (inner max-widths handle the content column). */
.et-l--footer .et_pb_section {
  padding: 0 !important;
  background: none !important;
}
.et-l--footer .et_pb_row {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.et-l--footer .et_pb_code { margin-bottom: 0 !important; }

/* hide Divi's default footer bottom-credits bar (our footer replaces it) */
#main-footer #footer-bottom { display: none; }


/* =====================================================
   9. SITE PAGE TEMPLATES (issue pages, articles, archives,
      standard pages, 404) — rendered via [cm_*] shortcodes
   ===================================================== */

/* Full-bleed canvas for any Theme Builder body that contains a
   cm template — kills Divi's boxed row without touching other layouts. */
.et-l--body .et_pb_section:has(.cm-tpl) { padding: 0 !important; background: transparent; }
.et-l--body .et_pb_row:has(.cm-tpl) {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.et-l--body .et_pb_code:has(.cm-tpl) { margin-bottom: 0 !important; }
.et-l--body .et_pb_code_inner:has(.cm-tpl) { width: 100%; }
#main-content:has(.cm-tpl) { padding-top: 0 !important; }

/* ---- shared navy page band ---- */
.cm-band-page {
  background:
    radial-gradient(80% 130% at 85% -10%, rgba(51,144,214,.25) 0%, transparent 55%),
    linear-gradient(180deg, var(--cm-navy-deep) 0%, var(--cm-navy) 100%);
  padding: 64px 0 56px;
  color: #fff;
}
.cm-band-page--slim { padding: 44px 0 38px; }
.cm-band-page--tall { padding: 110px 0 120px; min-height: 62vh; display: flex; align-items: center; }
.cm-band-page__inner { max-width: 1240px; margin: 0 auto; padding: 0 32px; width: 100%; }
.cm-band-page h1 {
  font-family: var(--cm-serif);
  font-size: 48px;
  line-height: 1.1;
  color: #fff;
  margin: 14px 0 0;
  letter-spacing: -1px;
}
.cm-band-page h1 em { font-style: normal; color: var(--cm-blue-light); }
.cm-band-page p, .cm-band-page__desc { color: #b9cde0; max-width: 640px; margin: 14px 0 0; line-height: 1.7; }
.cm-page-crumb { display: block; font-size: 12.5px; color: #7f97ac; margin-bottom: 2px; }
.cm-page-crumb a { color: #a8bccf; }
.cm-page-crumb a:hover { color: #fff; }

/* ---- issue page hero ---- */
.cm-issue-hero {
  background:
    radial-gradient(80% 130% at 85% -10%, rgba(51,144,214,.28) 0%, transparent 55%),
    radial-gradient(60% 100% at 10% 110%, rgba(232,164,95,.10) 0%, transparent 60%),
    linear-gradient(180deg, var(--cm-navy-deep) 0%, var(--cm-navy) 100%);
  padding: 64px 0 72px;
  color: #fff;
}
.cm-issue-hero__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 60px;
  align-items: center;
}
.cm-issue-hero__cover img {
  width: 320px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 40px 90px rgba(2,8,16,.6);
  transform: rotate(-1.5deg);
  transition: transform .3s ease;
  animation: cmCoverFloat 6s ease-in-out infinite;
}
.cm-issue-hero__cover img:hover { transform: rotate(0deg) scale(1.02); }
.cm-issue-hero__copy h1 {
  font-family: var(--cm-serif);
  font-size: 54px;
  line-height: 1.05;
  color: #fff;
  margin: 18px 0 0;
  letter-spacing: -1px;
}
.cm-issue-desc { color: #b9cde0; max-width: 560px; margin-top: 16px; line-height: 1.75; }
.cm-issue-desc p { color: inherit; margin: 0 0 10px; }
.cm-issue-stats { display: flex; gap: 26px; margin-top: 26px; font-size: 13.5px; color: #8fa6ba; }
.cm-issue-stats b { color: #fff; font-size: 20px; font-family: var(--cm-serif); margin-right: 6px; }
.cm-issue-nav { display: flex; gap: 22px; margin-top: 30px; font-size: 13.5px; font-weight: 700; flex-wrap: wrap; }
.cm-issue-nav a { color: #9fc3e2; }
.cm-issue-nav a:hover { color: #fff; }

/* ---- past issues grid ---- */
.cm-issues-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
  padding: 56px 0 30px;
}
.cm-issue-tile { display: block; text-align: center; }
.cm-issue-tile__cover { position: relative; display: block; }
.cm-issue-tile__cover img, .cm-issue-tile__blank {
  width: 100%;
  max-width: 240px;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(6,18,32,.22);
  transition: transform .22s ease, box-shadow .22s ease;
  display: inline-block;
  background: linear-gradient(150deg, #2a4a68, #764e6b);
}
.cm-issue-tile:hover .cm-issue-tile__cover img { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 28px 60px rgba(6,18,32,.32); }
.cm-issue-tile__badge {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, #f2c078, var(--cm-warm));
  color: #1a0e04; font-size: 10px; font-weight: 900; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(6,18,32,.3);
}
.cm-issue-tile__name { display: block; margin-top: 16px; font-family: var(--cm-serif); font-size: 19px; color: var(--cm-navy); }
.cm-issue-tile__count { display: block; margin-top: 4px; font-size: 12px; color: var(--cm-muted); text-transform: uppercase; letter-spacing: .08em; }

/* ---- article page ---- */
.cm-article-hero {
  background:
    radial-gradient(80% 130% at 80% -10%, rgba(51,144,214,.25) 0%, transparent 55%),
    linear-gradient(180deg, var(--cm-navy-deep) 0%, var(--cm-navy) 100%);
  padding: 60px 0 96px;
  color: #fff;
  text-align: center;
}
.cm-article-hero__inner { max-width: 880px; margin: 0 auto; padding: 0 28px; }
.cm-article-hero .cm-hero-kickers { justify-content: center; display: flex; gap: 10px; flex-wrap: wrap; }
.cm-article-hero .cm-card__cat { position: static; }
.cm-article-hero h1 {
  font-family: var(--cm-serif);
  font-size: 46px;
  line-height: 1.12;
  color: #fff;
  margin: 22px 0 0;
  letter-spacing: -.8px;
}
.cm-article-hero__meta { display: flex; justify-content: center; gap: 18px; margin-top: 22px; font-size: 14px; color: #8fa6ba; flex-wrap: wrap; }
.cm-article-hero__meta b { color: #fff; }
.cm-article-lead { max-width: 1000px; margin: -56px auto 0; padding: 0 28px; position: relative; z-index: 2; }
.cm-article-lead img { width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: 16px; box-shadow: 0 30px 70px rgba(6,18,32,.28); }

.cm-article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 28px 30px;
  font-size: 17.5px;
  line-height: 1.85;
  color: var(--cm-body);
}
.cm-article-body h2, .cm-article-body h3, .cm-article-body h4 { font-family: var(--cm-serif); color: var(--cm-navy); line-height: 1.25; margin: 1.6em 0 .6em; }
.cm-article-body h2 { font-size: 30px; }
.cm-article-body h3 { font-size: 24px; }
.cm-article-body p { margin: 0 0 1.35em; }
.cm-article-body a { color: var(--cm-blue); text-decoration: underline; text-decoration-color: rgba(35,113,177,.35); text-underline-offset: 3px; }
.cm-article-body a:hover { text-decoration-color: var(--cm-blue); }
.cm-article-body img { max-width: 100%; height: auto; border-radius: 12px; }
.cm-article-body blockquote {
  margin: 2em 0;
  padding: 8px 0 8px 26px;
  border-left: 4px solid var(--cm-blue-light);
  font-family: var(--cm-serif);
  font-size: 21px;
  line-height: 1.6;
  color: var(--cm-navy);
}
.cm-article-body ul, .cm-article-body ol { margin: 0 0 1.35em; padding-left: 1.4em; }
.cm-article-body li { margin-bottom: .5em; }
.cm-article-body hr { border: 0; border-top: 1px solid var(--cm-line-soft); margin: 2.4em 0; }
.cm-article-related { padding-bottom: 60px; }

/* ---- pagination ---- */
.cm-pagination { display: flex; justify-content: center; gap: 6px; padding: 44px 0 70px; flex-wrap: wrap; }
.cm-pagination .page-numbers {
  min-width: 40px; height: 40px; line-height: 40px; text-align: center;
  display: inline-block; padding: 0 8px;
  border-radius: 10px; border: 1.5px solid var(--cm-line);
  color: var(--cm-slate); font-weight: 700; font-size: 14px;
  transition: all .15s ease;
}
.cm-pagination .page-numbers.current,
.cm-pagination .page-numbers:hover { background: var(--cm-blue); border-color: var(--cm-blue); color: #fff; }
.cm-pagination .dots { border: 0; }

/* ---- empty state + search forms in bands ---- */
.cm-empty { max-width: 560px; margin: 60px auto 90px; text-align: center; color: var(--cm-muted); }
.cm-empty .search-form, .cm-404__search .search-form { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.cm-empty input[type="search"], .cm-404__search input[type="search"] {
  padding: 12px 16px; border-radius: 10px; border: 1.5px solid var(--cm-line);
  font-size: 15px; min-width: 260px;
}
.cm-404__search input[type="search"] { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; }
.cm-404__search input[type="search"]::placeholder { color: #8fa6ba; }
.cm-empty input[type="submit"], .cm-404__search input[type="submit"] {
  padding: 12px 20px; border-radius: 10px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, var(--cm-blue-light), var(--cm-blue)); color: #fff; font-weight: 700;
}

/* ---- 404 ---- */
.cm-404 .cm-band-page__inner { text-align: center; max-width: 720px; }
.cm-404__code {
  font-family: var(--cm-serif);
  font-size: 120px;
  line-height: 1;
  color: rgba(255,255,255,.12);
  display: block;
  letter-spacing: -4px;
}
.cm-404 h1 { margin-top: -30px; }
.cm-404 .cm-band-page__inner p { margin-left: auto; margin-right: auto; }
.cm-404__actions { display: flex; gap: 14px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.cm-btn--ghost-dark, .cm-btn--ghost.cm-btn--ghost-dark {
  color: #dcebf7 !important;
  border-color: rgba(255,255,255,.3) !important;
  background: transparent !important;
}
.cm-btn--ghost-dark:hover { border-color: #fff !important; color: #fff !important; }
.cm-404__search { margin-top: 34px; }

/* ---- standard page body ----
   Two kinds of pages land here: Elementor-built layouts (keep their own
   styling, full width) and plain classic-editor pages, which arrive with
   NO typography at all (Times fallback, unconstrained lines). Give the
   plain ones a real editorial reading column; leave Elementor alone. */
.cm-page-body { max-width: 1240px; margin: 0 auto; padding: 44px 32px 80px; }
.cm-page-body > :not([class*="elementor"]) { max-width: 880px; margin-left: auto; margin-right: auto; }
.cm-page-body {
  font-family: var(--cm-sans);
  font-size: 17px;
  line-height: 1.8;
  color: var(--cm-body);
}
.cm-page-body p { margin: 0 0 1.25em; }
.cm-page-body p:empty { display: none; }
.cm-page-body h1, .cm-page-body h2, .cm-page-body h3, .cm-page-body h4 {
  font-family: var(--cm-serif);
  color: var(--cm-navy);
  line-height: 1.25;
  margin: 1.7em auto .6em;
}
.cm-page-body > h1:first-child, .cm-page-body > h2:first-child,
.cm-page-body > h3:first-child { margin-top: .2em; }
.cm-page-body h1 { font-size: 34px; }
.cm-page-body h2 { font-size: 29px; }
.cm-page-body h3 { font-size: 23px; }
.cm-page-body h4 { font-size: 19px; }
.cm-page-body a { color: var(--cm-blue); text-decoration: underline; text-decoration-color: rgba(35,113,177,.35); text-underline-offset: 3px; }
.cm-page-body a:hover { text-decoration-color: var(--cm-blue); }
.cm-page-body ul, .cm-page-body ol { margin: 0 0 1.25em; padding-left: 1.5em; }
.cm-page-body li { margin-bottom: .45em; }
.cm-page-body img { max-width: 100%; height: auto; border-radius: 12px; }
.cm-page-body blockquote {
  margin: 1.8em auto;
  padding: 6px 0 6px 24px;
  border-left: 4px solid var(--cm-blue-light);
  font-family: var(--cm-serif);
  font-size: 19px;
  color: var(--cm-navy);
}
.cm-page-body table { border-collapse: collapse; width: 100%; margin: 0 0 1.5em; font-size: 15px; }
.cm-page-body th, .cm-page-body td { border: 1px solid var(--cm-line); padding: 10px 14px; text-align: left; }
.cm-page-body th { background: #eef3f9; color: var(--cm-navy); }

/* Legacy content pasted from Word carries inline
   font-family:"Times New Roman" spans that beat any stylesheet —
   force them back to the page's type system. */
.cm-page-body span, .cm-page-body font,
.cm-page-body p, .cm-page-body li, .cm-page-body td {
  font-family: inherit !important;
}
.cm-page-body h1 span, .cm-page-body h2 span,
.cm-page-body h3 span, .cm-page-body h4 span { font-family: inherit !important; }

/* Long-form Elementor TEXT widgets get a comfortable reading measure;
   other Elementor widgets (TOCs, columns, forms) keep their layout. */
.cm-page-body .elementor-widget-text-editor .elementor-widget-container {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- responsive pass ---- */
@media (max-width: 1100px) {
  .cm-issues-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .cm-issue-hero__inner { grid-template-columns: 1fr; text-align: center; gap: 36px; }
  .cm-issue-hero__cover img { width: 250px; }
  .cm-issue-stats, .cm-issue-nav { justify-content: center; }
  .cm-issue-desc { margin-left: auto; margin-right: auto; }
  .cm-band-page h1 { font-size: 38px; }
  .cm-issue-hero__copy h1 { font-size: 40px; }
  .cm-article-hero h1 { font-size: 34px; }
}
@media (max-width: 700px) {
  .cm-issues-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .cm-band-page { padding: 44px 0 40px; }
  .cm-band-page__inner, .cm-home-inner, .cm-article-hero__inner { padding-left: 20px; padding-right: 20px; }
  .cm-article-body { padding: 40px 20px 20px; font-size: 16.5px; }
  .cm-article-lead { padding: 0 14px; margin-top: -40px; }
  .cm-404__code { font-size: 84px; }
  .cm-hero-copy h1 { font-size: 32px; }
  .cm-hero-nav { justify-content: center; }
}

/* admin-only marker for shortcodes whose plugin is gone (see
   cm_strip_dead_shortcodes) — invisible to visitors, obvious to editors */
.cm-dead-sc {
  display: inline-block;
  font-family: var(--cm-sans);
  font-size: 12px;
  font-weight: 700;
  color: #8a5a00;
  background: #fff4d6;
  border: 1px dashed #e0b040;
  border-radius: 6px;
  padding: 3px 9px;
}
