/**
 * HowMira Layout System v3.2 — Blocksy design layer
 * Brand: ink #0B1220 · teal #0D9488 / #0F766E · Fraunces + Outfit
 * Sections: foundations · Blocksy adapter · components · surfaces · responsive.
 *
 * Source of truth for visual rules. Live delivery (preferred):
 *   HowMira Layout plugin → uploads/howmira/hm-layout.css (fonts enqueued in PHP).
 * Fallback: Additional CSS via howmira_force_css.js (keeps @import below).
 */

:root {
  --hm-ink: #0B1220;
  --hm-ink-soft: #1e293b;
  --hm-muted: #64748b;
  --hm-line: #e2e8f0;
  --hm-surface: #f8fafc;
  --hm-surface-2: #f1f5f9;
  --hm-mist: #f0fdfa;
  --hm-accent: #0D9488;
  --hm-accent-deep: #0F766E;
  --hm-accent-soft: #ccfbf1;
  --hm-accent-mid: #99f6e4;
  --hm-warn: #92400e;
  --hm-warn-soft: #fffbeb;
  --hm-warn-border: #fcd34d;
  --hm-danger: #991b1b;
  --hm-danger-soft: #fef2f2;
  --hm-radius: 14px;
  --hm-radius-sm: 10px;
  --hm-radius-lg: 22px;
  --hm-max: 42rem;
  --hm-wide: 72rem;
  --hm-font: 'Outfit', system-ui, sans-serif;
  --hm-display: 'Fraunces', Georgia, serif;
  --hm-shadow: 0 12px 40px rgba(11, 18, 32, 0.07);
  --hm-shadow-lg: 0 24px 70px rgba(11, 18, 32, 0.12);
  --hm-space-1: 0.5rem;
  --hm-space-2: 0.75rem;
  --hm-space-3: 1rem;
  --hm-space-4: 1.5rem;
  --hm-space-5: 2rem;
  --hm-space-6: 3rem;
  --hm-teal: #0D9488;
  --hm-teal-dark: #0F766E;
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  font-family: var(--hm-font);
  color: var(--hm-ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

body.hm-front,
body.hm-guides,
body:has(.hm-page-hero) {
  background: linear-gradient(180deg, #eef6f5 0%, #f8fafc 22%, #ffffff 55%);
}

body.single,
body.single-post,
body.hm-single {
  background: linear-gradient(180deg, #e8f4f2 0%, #f4f8f7 30%, #fafbfc 70%);
}

h1, h2, h3, h4,
.entry-header .page-title,
.wp-block-heading {
  font-family: var(--hm-display);
  letter-spacing: -0.02em;
  color: var(--hm-ink);
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}
body { overflow-x: clip; }

:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid var(--hm-accent);
  outline-offset: 3px;
}

.hm-skip-link {
  position: fixed;
  z-index: 99999;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-160%);
  padding: 0.65rem 1rem;
  border-radius: var(--hm-radius-sm);
  background: var(--hm-ink);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}
.hm-skip-link:focus { transform: translateY(0); }

/* ═══════════════ HEADER ═══════════════ */
.ct-header {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hm-line);
  box-shadow: 0 1px 0 rgba(11, 18, 32, 0.02);
}
.ct-header .ct-menu a {
  font-family: var(--hm-font);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ct-header .ct-menu .current-menu-item > a,
.ct-header .ct-menu a:hover {
  color: var(--hm-accent) !important;
}
.ct-header .ct-menu a {
  position: relative;
}
.ct-header .ct-menu a::after {
  position: absolute;
  right: 1rem;
  bottom: 0.45rem;
  left: 1rem;
  height: 2px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transition: transform 0.16s ease;
}
.ct-header .ct-menu .current-menu-item > a::after,
.ct-header .ct-menu a:hover::after {
  transform: scaleX(1);
}
.custom-logo-link img,
.ct-header [data-id="logo"] img {
  max-height: 40px;
  width: auto;
}
[data-id="logo"] .site-title,
.site-branding .site-title,
.ct-header .site-title {
  display: none !important;
}

/* ═══════════════ BUTTONS ═══════════════ */
.wp-block-button__link,
.ct-button,
button[type="submit"],
.hm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--hm-accent) !important;
  border: 1px solid var(--hm-accent) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-family: var(--hm-font);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  padding: 0.75rem 1.35rem;
  transition: background 0.15s ease, transform 0.15s ease;
}
.wp-block-button__link:hover,
.ct-button:hover,
.hm-btn:hover {
  background: var(--hm-accent-deep) !important;
  border-color: var(--hm-accent-deep) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.hm-btn--ghost {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  color: #fff !important;
}
.hm-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}
.hm-btn--solid {
  background: var(--hm-accent) !important;
}

/* ═══════════════ HOME / HUB HERO ═══════════════ */
.home .entry-header,
.home .hero-section .page-title,
.home h1.page-title,
body:has(.hm-home-hero) .entry-header .page-title,
body:has(.hm-home-hero) .hero-section .page-title {
  display: none !important;
}
body:has(.hm-home-hero) #main-container,
body:has(.hm-home-hero) .site-main,
body:has(.hm-home-hero) .site-main > .ct-container {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.hm-home-hero {
  position: relative;
  background:
    radial-gradient(ellipse 70% 55% at 90% 10%, rgba(13, 148, 136, 0.4), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(15, 118, 110, 0.25), transparent 50%),
    linear-gradient(128deg, #0B1220 0%, #0c2428 42%, #0F766E 100%);
  color: #f8fafc;
  padding: 4.75rem 1.5rem 4rem;
  margin: 0 calc(50% - 50vw);
  width: 100vw;
  min-height: 440px;
  display: flex;
  align-items: center;
}
.hm-home-hero__inner {
  max-width: 740px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}
.hm-home-hero--compact {
  min-height: 350px;
  padding-block: 3.75rem 3.25rem;
}
.hm-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  margin: 0 0 1.1rem;
}
.hm-home-hero h1 {
  font-family: var(--hm-display);
  font-size: clamp(2.35rem, 5vw, 3.35rem);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 0.85rem;
  color: #fff;
  letter-spacing: -0.03em;
}
.hm-home-hero .hm-lead,
.hm-home-hero > .hm-home-hero__inner > p:not(.hm-actions) {
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  line-height: 1.55;
  opacity: 0.92;
  max-width: 34rem;
  margin: 0 auto 1.5rem;
  color: rgba(248, 250, 252, 0.92);
  font-family: var(--hm-font);
}
.hm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin: 0 0 1.75rem;
}
.hm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0;
}
.hm-chip {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff !important;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.hm-chip:hover {
  background: var(--hm-accent);
  border-color: var(--hm-accent);
  color: #fff !important;
}

/* Light chips on content sections */
.hm-chips--light .hm-chip {
  background: #fff;
  border-color: var(--hm-line);
  color: var(--hm-ink-soft) !important;
}
.hm-chips--light .hm-chip:hover {
  background: var(--hm-mist);
  border-color: var(--hm-accent-mid);
  color: var(--hm-accent-deep) !important;
}

/* ═══════════════ SECTIONS / CARDS ═══════════════ */
.hm-home-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.75rem 1.35rem 1rem;
}
.hm-home-section h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  margin: 0 0 0.5rem;
  text-align: center;
}
.hm-home-section > p,
.hm-section-lead {
  text-align: center;
  color: var(--hm-muted);
  max-width: 36rem;
  margin: 0 auto 1.75rem;
  font-size: 1.02rem;
  line-height: 1.55;
}

.hm-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 0 0 2.75rem;
}
.hm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.3rem;
  background: #fff;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(11, 18, 32, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  color: inherit;
}
.hm-card:hover {
  border-color: var(--hm-accent-mid);
  box-shadow: var(--hm-shadow);
  transform: translateY(-2px);
}
.hm-card__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hm-accent);
}
.hm-card__icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 50%;
  background: var(--hm-mist);
  color: var(--hm-accent-deep) !important;
  font-size: 0.72rem !important;
  font-weight: 700;
}
.hm-card strong {
  font-family: var(--hm-display);
  font-size: 1.2rem;
  color: var(--hm-ink);
  font-weight: 700;
}
.hm-card span:last-child {
  font-size: 0.9rem;
  color: var(--hm-muted);
  line-height: 1.45;
}

.hm-trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin: 0 0 2.5rem;
}
.hm-trust-item {
  background: #fff;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-sm);
  padding: 1rem 1.1rem;
  text-align: center;
}
.hm-trust-item strong {
  display: block;
  font-family: var(--hm-display);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}
.hm-trust-item span {
  font-size: 0.85rem;
  color: var(--hm-muted);
  line-height: 1.4;
}

.hm-section-heading {
  align-items: end;
  margin: 0 0 1.1rem;
  border-bottom: 1px solid var(--hm-line);
}
.hm-section-heading h2 {
  margin: 0;
  padding-bottom: 0.75rem;
  text-align: left;
}
.hm-section-heading p {
  margin: 0 0 0.75rem;
  color: var(--hm-muted);
  font-size: 0.9rem;
}
.hm-section-heading a {
  color: var(--hm-accent-deep);
  font-weight: 700;
  text-decoration: none;
}

/* Dynamic home and Guides query cards */
.hm-post-grid .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hm-post-grid .wp-block-post {
  margin: 0;
}
.hm-post-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  background: #fff;
  box-shadow: 0 2px 8px rgba(11, 18, 32, 0.03);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.hm-post-card:hover {
  transform: translateY(-3px);
  border-color: var(--hm-accent-mid);
  box-shadow: var(--hm-shadow);
}
.hm-post-card .wp-block-post-featured-image {
  margin: 0;
  overflow: hidden;
  background: var(--hm-surface-2);
}
.hm-post-card .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.hm-post-card:hover .wp-block-post-featured-image img {
  transform: scale(1.025);
}
.hm-post-card__body {
  padding: 1rem 1.05rem 1.15rem;
}
.hm-post-card__category {
  margin: 0 0 0.45rem;
  color: var(--hm-accent-deep);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hm-post-card__category a {
  color: inherit;
  text-decoration: none;
}
.hm-post-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  line-height: 1.25;
}
.hm-post-card h3 a {
  color: var(--hm-ink);
  text-decoration: none;
}
.hm-post-card h3 a:hover { color: var(--hm-accent-deep); }
.hm-post-card .wp-block-post-excerpt {
  margin: 0;
  color: var(--hm-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.hm-post-card .wp-block-post-excerpt__excerpt { margin: 0 0 0.7rem; }
.hm-post-card .wp-block-post-date {
  color: var(--hm-muted);
  font-size: 0.75rem;
}
.hm-post-grid .wp-block-query-pagination {
  margin-top: 2rem;
}

/* Latest posts on hubs */
.hm-home-section .wp-block-latest-posts {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 2rem;
  display: grid;
  gap: 0.85rem;
}
.hm-home-section .wp-block-latest-posts li {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 1.1rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  background: #fff;
  box-shadow: 0 1px 4px rgba(11, 18, 32, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hm-home-section .wp-block-latest-posts li:hover {
  border-color: var(--hm-accent-mid);
  box-shadow: var(--hm-shadow);
}
.hm-home-section .wp-block-latest-posts img {
  border-radius: var(--hm-radius-sm);
  width: 148px;
  height: 96px;
  object-fit: cover;
}
.hm-home-section .wp-block-latest-posts a {
  color: var(--hm-ink);
  font-weight: 650;
  text-decoration: none;
  font-family: var(--hm-display);
  font-size: 1.08rem;
  line-height: 1.3;
}
.hm-home-section .wp-block-latest-posts a:hover {
  color: var(--hm-accent);
}
.hm-home-section .wp-block-latest-posts__post-date {
  display: block;
  font-size: 0.78rem;
  color: var(--hm-muted);
  margin-top: 0.3rem;
  font-family: var(--hm-font);
  font-weight: 400;
}

/* ═══════════════ STATIC PAGES ═══════════════ */
.page .hm-page {
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.7;
}
.hm-page-hero {
  text-align: center;
  padding: 2.5rem 1.25rem 1.5rem;
}
.hm-page-hero h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  margin: 0 0 0.65rem;
}
.hm-page-hero p {
  color: var(--hm-muted);
  margin: 0 auto;
  max-width: 32rem;
}
.hm-page-kicker,
.hm-contact-card__label {
  color: var(--hm-accent-deep) !important;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hm-values {
  display: grid;
  gap: 0.8rem;
  margin: 1.5rem 0 2rem;
}
.hm-values > div,
.hm-contact-card {
  padding: 1.05rem 1.15rem;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  background: #fff;
  box-shadow: 0 2px 8px rgba(11, 18, 32, 0.03);
}
.hm-values strong,
.hm-values span {
  display: block;
}
.hm-values strong {
  margin-bottom: 0.2rem;
  font-family: var(--hm-display);
}
.hm-values span,
.hm-contact-card > p:last-child {
  color: var(--hm-muted);
  font-size: 0.95rem;
}
.hm-contact-card {
  margin: 0 0 2rem;
  border-top: 4px solid var(--hm-accent);
}
.hm-contact-card p { margin: 0.35rem 0; }
.hm-contact-card a {
  color: var(--hm-accent-deep);
  font-size: 1.2rem;
  font-weight: 700;
}

/* Hide Blocksy page title when custom hero present */
.page:has(.hm-page-hero) .entry-header,
.page:has(.hm-home-hero) .entry-header {
  display: none !important;
}

/* ═══════════════ SINGLE POST CARD ═══════════════ */
body.single .ct-container,
body.single-post .ct-container,
body.hm-single .ct-container {
  max-width: 820px !important;
}

.single .site-main > article,
.single-post .site-main > article,
.hm-single .site-main > article,
.single article.post,
.single-post article[id^="post-"] {
  max-width: 760px !important;
  margin: 1.75rem auto 3.5rem !important;
  background: #fff !important;
  border: 1px solid var(--hm-line) !important;
  border-radius: 18px !important;
  box-shadow: var(--hm-shadow) !important;
  overflow: hidden !important;
  padding-bottom: 0.5rem !important;
}

.single .ct-featured-image,
.single figure.ct-featured-image,
.single .hm-featured {
  margin: 0 !important;
  max-width: none !important;
  border-radius: 0 !important;
  width: 100% !important;
}
.single .ct-featured-image .ct-media-container,
.single .ct-featured-image img,
.single img.wp-post-image {
  border-radius: 0 !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  display: block;
}

.single .hero-section,
.single .hero-section.is-width-constrained,
.single .entry-header {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 1.4rem 1.85rem 0.25rem !important;
}

/* Theme meta — quiet; kit trust strip carries weight */
.single .entry-meta,
.single ul.entry-meta,
.single .hero-section .entry-meta {
  display: none !important;
}

.single .entry-header .page-title,
.single .entry-header .entry-title,
.single h1.page-title,
.single h1.entry-title {
  font-family: var(--hm-display);
  font-size: clamp(1.75rem, 2.7vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.7rem;
}

.single .page-description,
.single .hero-section .page-description {
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--hm-ink-soft);
  margin: 0 0 0.35rem;
  max-width: 40rem;
  font-weight: 450;
}
.single .page-description p { margin: 0; }
/* Show dek on mobile too */
.single .page-description.ct-hidden-sm {
  display: block !important;
}

.single .entry-content,
.single .entry-content.is-layout-constrained {
  max-width: none !important;
  margin: 0 !important;
  padding: 0.35rem 1.85rem 1.5rem !important;
  font-size: 1.06rem;
  line-height: 1.75;
}

/* Kit wrapper */
.hm-kit {
  color: var(--hm-ink);
  line-height: 1.75;
  font-size: 1.05rem;
}
.hm-kit > *:first-child { margin-top: 0; }

.hm-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  margin: 0 0 1.35rem;
  padding: 0.7rem 0 1rem;
  border-bottom: 1px solid var(--hm-line);
}
.hm-pill {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--hm-mist);
  border: 1px solid var(--hm-accent-mid);
  color: var(--hm-accent-deep) !important;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none !important;
}
.hm-trust__meta {
  font-size: 0.8rem;
  color: var(--hm-muted);
}
.hm-trust__meta strong {
  color: var(--hm-ink-soft);
  font-weight: 600;
}

.single .entry-content > p:first-of-type,
.hm-kit > p:first-of-type {
  font-size: 1.12rem;
  color: var(--hm-ink-soft);
  font-weight: 500;
}

.single .entry-content h2,
.hm-kit h2 {
  font-size: 1.38rem;
  margin: 2.35rem 0 0.75rem;
  line-height: 1.25;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--hm-accent-soft);
}
.single .entry-content h3,
.hm-kit h3 {
  font-size: 1.12rem;
  margin: 1.65rem 0 0.5rem;
}
.single .entry-content ul,
.single .entry-content ol,
.hm-kit ul,
.hm-kit ol {
  padding-left: 1.25rem;
}
.single .entry-content li,
.hm-kit li {
  margin: 0.4rem 0;
}

.single .entry-content table,
.hm-kit table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1.35rem 0;
  display: block;
  overflow-x: auto;
}
.single .entry-content th,
.single .entry-content td,
.hm-kit th,
.hm-kit td {
  border: 1px solid var(--hm-line);
  padding: 0.6rem 0.75rem;
  text-align: left;
}
.single .entry-content th,
.hm-kit th {
  background: var(--hm-mist);
  color: var(--hm-accent-deep);
  font-weight: 600;
}

.single .entry-content figure.wp-block-image {
  margin: 1.5rem 0;
}
.single .entry-content figure.wp-block-image img {
  border-radius: var(--hm-radius);
  width: 100%;
  height: auto;
}
.single a,
.hm-kit a {
  color: var(--hm-accent-deep);
}
.single a:hover,
.hm-kit a:hover {
  color: var(--hm-accent);
}

/* Migrated quick boxes → kit energy */
.single .entry-content div[style*="border-left"],
.single .entry-content div[style*="background:#f0fdfa"],
.single .entry-content div[style*="background: #f0fdfa"],
.hm-kit div[style*="border-left"] {
  background: var(--hm-mist) !important;
  border: 1px solid var(--hm-accent-mid) !important;
  border-left: 4px solid var(--hm-accent) !important;
  border-radius: var(--hm-radius) !important;
  padding: 1.1rem 1.25rem !important;
  margin: 0 0 1.5rem !important;
  box-shadow: 0 1px 0 rgba(13, 148, 136, 0.06);
}
.single .entry-content div[style*="border-left"] > strong:first-child,
.hm-kit div[style*="border-left"] > strong:first-child {
  display: block;
  color: var(--hm-accent-deep) !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem !important;
  margin-bottom: 0.45rem !important;
  font-family: var(--hm-font) !important;
}

/* Kit components */
.hm-quick {
  background: var(--hm-mist);
  border: 1px solid var(--hm-accent-mid);
  border-radius: var(--hm-radius);
  padding: 1.1rem 1.25rem;
  margin: 0 0 1.5rem;
}
.hm-quick > strong:first-child,
.hm-quick .hm-quick__label {
  color: var(--hm-accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
}
.hm-callout {
  border-radius: 0 var(--hm-radius-sm) var(--hm-radius-sm) 0;
  padding: 0.95rem 1.1rem;
  margin: 1.15rem 0;
  font-size: 0.95rem;
}
.hm-callout--tip {
  background: var(--hm-mist);
  border-left: 4px solid var(--hm-accent);
}
.hm-callout--warning {
  background: var(--hm-warn-soft);
  border: 1px solid var(--hm-warn-border);
  border-radius: var(--hm-radius-sm);
  color: var(--hm-warn);
}
.hm-callout--navy {
  border-left: 4px solid var(--hm-ink);
  background: #eef2ff;
  color: var(--hm-ink-soft);
}
.hm-takeaways,
.hm-decide,
.hm-keep,
.hm-mistakes,
.hm-reviewed,
.hm-faq {
  margin: 1.35rem 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  background: var(--hm-surface);
}
.hm-takeaways {
  border-color: var(--hm-accent-mid);
  background: var(--hm-mist);
}
.hm-decide {
  border-left: 4px solid var(--hm-accent);
  background: #fff;
}
.hm-mistakes {
  border-color: var(--hm-warn-border);
  background: var(--hm-warn-soft);
}
.hm-reviewed {
  color: var(--hm-muted);
  font-size: 0.88rem;
}
.hm-faq {
  padding-block: 0.25rem 1.1rem;
  background: #fff;
}
.hm-faq h2:first-child { margin-top: 1.25rem; }
.hm-steps {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  counter-reset: hm-step;
}
.hm-steps li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin: 0 0 0.95rem;
  counter-increment: hm-step;
}
.hm-steps li::before {
  content: counter(hm-step);
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--hm-accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.hm-related {
  margin: 2.5rem 0 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hm-line);
}
.hm-related__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hm-muted);
  margin-bottom: 0.75rem;
}
.hm-related__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.hm-related__list a {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius-sm);
  background: #fff;
  color: var(--hm-ink) !important;
  font-family: var(--hm-display);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none !important;
}
.hm-related__list a:hover {
  background: var(--hm-mist);
  border-color: var(--hm-accent-mid);
  color: var(--hm-accent-deep) !important;
}
.hm-related-card__image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--hm-surface-2);
}
.hm-related-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hm-related-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0.85rem;
}
.hm-related-card__category {
  color: var(--hm-accent-deep);
  font-family: var(--hm-font);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hm-related-card__body strong {
  margin: 0.2rem 0 0.35rem;
  color: inherit;
  line-height: 1.3;
}
.hm-related-card__excerpt {
  color: var(--hm-muted);
  font-family: var(--hm-font);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.4;
}

.hm-cta {
  background: var(--hm-mist);
  border: 1px solid var(--hm-accent-mid);
  border-radius: var(--hm-radius);
  padding: 1.35rem 1.4rem;
  margin: 1.25rem 0 0.5rem;
  text-align: center;
}
.hm-cta h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  border: 0;
  padding: 0;
}
.hm-cta p {
  margin: 0 0 0.85rem;
  color: var(--hm-ink-soft);
}

/* ═══════════════ ARCHIVE / BLOG / SEARCH ═══════════════ */
.archive .hero-section,
.blog .hero-section,
.search .hero-section {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.75rem 1.25rem 1.35rem;
  text-align: center;
}
.archive .page-title,
.blog .page-title,
.search .page-title {
  font-family: var(--hm-font);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.55rem;
}
.archive .page-description,
.blog .page-description {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--hm-muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.archive .entries,
.blog .entries,
.search .entries {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.1rem !important;
  max-width: 960px;
  margin: 0 auto 3rem;
  padding: 0 1.15rem 2rem;
}

/* Blocksy card order is meta → title → media → excerpt → meta.
   Reorder into an image-led horizontal card. */
.blog .entry-card,
.archive article.entry-card,
.search article.entry-card {
  display: grid !important;
  grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  grid-template-areas:
    "media category"
    "media title"
    "media excerpt"
    "media footer";
  column-gap: 1.25rem;
  row-gap: 0.35rem;
  align-items: start;
  border: 1px solid var(--hm-line) !important;
  border-radius: var(--hm-radius) !important;
  background: #fff !important;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(11, 18, 32, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.blog .entry-card:hover,
.archive article.entry-card:hover,
.search article.entry-card:hover {
  border-color: var(--hm-accent-mid) !important;
  box-shadow: var(--hm-shadow);
  transform: translateY(-2px);
}

.blog .entry-card > .ct-media-container,
.archive article.entry-card > .ct-media-container,
.search article.entry-card > .ct-media-container {
  grid-area: media;
  grid-row: 1 / -1;
  position: relative;
  align-self: stretch;
  width: 100% !important;
  min-height: 170px;
  margin: 0 !important;
  border-radius: 0 !important;
  overflow: hidden;
  background: var(--hm-surface-2);
}
.blog .entry-card > .ct-media-container img,
.archive article.entry-card > .ct-media-container img,
.search article.entry-card > .ct-media-container img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  aspect-ratio: auto !important;
}

.blog .entry-card > .entry-meta[data-id="meta_1"],
.archive article.entry-card > .entry-meta[data-id="meta_1"],
.search article.entry-card > .entry-meta[data-id="meta_1"] {
  grid-area: category;
  margin: 0;
  padding: 1.15rem 1.25rem 0 0;
  list-style: none;
}
.blog .entry-card > .entry-title,
.archive article.entry-card > .entry-title,
.search article.entry-card > .entry-title {
  grid-area: title;
  margin: 0;
  padding: 0 1.25rem 0 0;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.25;
}
.blog .entry-card > .entry-excerpt,
.archive article.entry-card > .entry-excerpt,
.search article.entry-card > .entry-excerpt {
  grid-area: excerpt;
  margin: 0;
  padding: 0 1.25rem 0 0;
  color: var(--hm-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.blog .entry-card > .entry-meta[data-id="meta_2"],
.archive article.entry-card > .entry-meta[data-id="meta_2"],
.search article.entry-card > .entry-meta[data-id="meta_2"] {
  grid-area: footer;
  margin: 0;
  padding: 0.35rem 1.25rem 1.15rem 0;
  list-style: none;
  color: var(--hm-muted);
  font-size: 0.78rem;
}

.blog .entry-card .meta-categories a,
.archive article.entry-card .meta-categories a,
.search article.entry-card .meta-categories a {
  display: inline-block;
  padding: 0.22rem 0.65rem;
  border: 1px solid var(--hm-accent-mid);
  border-radius: 999px;
  background: var(--hm-mist);
  color: var(--hm-accent-deep) !important;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none !important;
  text-transform: uppercase;
}
.blog .entry-card .meta-author,
.archive article.entry-card .meta-author,
.search article.entry-card .meta-author {
  display: none !important;
}
.blog h2.entry-title a,
.archive h2.entry-title a,
.search h2.entry-title a {
  color: var(--hm-ink);
  text-decoration: none;
}
.blog h2.entry-title a:hover,
.archive h2.entry-title a:hover,
.search h2.entry-title a:hover {
  color: var(--hm-accent-deep);
}

.ct-pagination,
.wp-block-query-pagination {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.5rem 0 2.5rem;
}
.ct-pagination a,
.ct-pagination span,
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
  display: inline-flex;
  min-width: 2.4rem;
  height: 2.4rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hm-line);
  border-radius: 999px;
  background: #fff;
  color: var(--hm-ink-soft) !important;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
}
.ct-pagination .current,
.wp-block-query-pagination .current {
  border-color: var(--hm-accent);
  background: var(--hm-accent);
  color: #fff !important;
}
.ct-pagination a:hover,
.wp-block-query-pagination a:hover {
  border-color: var(--hm-accent-mid);
  background: var(--hm-mist);
  color: var(--hm-accent-deep) !important;
}

.search-form {
  display: flex;
  gap: 0.55rem;
  max-width: 34rem;
  margin: 0 auto 2rem;
}
.search-form input[type="search"] {
  flex: 1;
  border: 1px solid var(--hm-line);
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  font-family: var(--hm-font);
}
.search-form input[type="submit"] {
  border-radius: 999px !important;
}

/* ═══════════════ FOOTER ═══════════════ */
.ct-footer {
  font-family: var(--hm-font);
  font-size: 0.9rem;
  border-top: 1px solid var(--hm-line);
  background: var(--hm-surface) !important;
}
.ct-footer a { color: var(--hm-accent-deep); }

/* Keep the fallback Blocksy footer clean when the companion is unavailable. */
.ct-footer-copyright a[href*="creativethemes"],
.ct-footer-copyright a[href*="wordpress.org"] {
  display: none !important;
}
.hm-layout .ct-footer {
  display: none;
}
.hm-site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background: var(--hm-ink);
  color: #cbd5e1;
  font-family: var(--hm-font);
}
.hm-site-footer__inner {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  gap: 2rem;
  width: min(calc(100% - 2.5rem), var(--hm-wide));
  margin: 0 auto;
  padding: 3.5rem 0 2.5rem;
}
.hm-site-footer__brand img {
  width: min(190px, 100%);
  max-height: 48px;
}
.hm-site-footer__brand .custom-logo-link {
  display: inline-flex;
  padding: 0.55rem 0.75rem;
  border-radius: var(--hm-radius-sm);
  background: #fff;
}
.hm-site-footer__brand p {
  max-width: 18rem;
  color: #94a3b8;
  line-height: 1.6;
}
.hm-site-footer h2 {
  margin: 0 0 0.8rem;
  color: #fff;
  font-family: var(--hm-font);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hm-site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.hm-site-footer li { margin: 0.45rem 0; }
.hm-site-footer a {
  color: #cbd5e1;
  text-decoration: none;
}
.hm-site-footer a:hover { color: #5eead4; }
.hm-site-footer__bottom {
  display: flex;
  width: min(calc(100% - 2.5rem), var(--hm-wide));
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  padding: 1.25rem 0 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #94a3b8;
  font-size: 0.82rem;
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1024px) {
  .hm-post-grid .wp-block-post-template {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hm-site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .blog .entry-card,
  .archive article.entry-card,
  .search article.entry-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "category"
      "title"
      "excerpt"
      "footer";
  }
  .blog .entry-card > .ct-media-container,
  .archive article.entry-card > .ct-media-container,
  .search article.entry-card > .ct-media-container {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .blog .entry-card > .entry-meta[data-id="meta_1"],
  .archive article.entry-card > .entry-meta[data-id="meta_1"],
  .search article.entry-card > .entry-meta[data-id="meta_1"],
  .blog .entry-card > .entry-title,
  .archive article.entry-card > .entry-title,
  .search article.entry-card > .entry-title,
  .blog .entry-card > .entry-excerpt,
  .archive article.entry-card > .entry-excerpt,
  .search article.entry-card > .entry-excerpt,
  .blog .entry-card > .entry-meta[data-id="meta_2"],
  .archive article.entry-card > .entry-meta[data-id="meta_2"],
  .search article.entry-card > .entry-meta[data-id="meta_2"] {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
  .blog .entry-card > .entry-meta[data-id="meta_1"],
  .archive article.entry-card > .entry-meta[data-id="meta_1"],
  .search article.entry-card > .entry-meta[data-id="meta_1"] {
    padding-top: 1rem;
  }
  .blog .entry-card > .entry-meta[data-id="meta_2"],
  .archive article.entry-card > .entry-meta[data-id="meta_2"],
  .search article.entry-card > .entry-meta[data-id="meta_2"] {
    padding-bottom: 1.1rem;
  }
  .hm-related__list {
    grid-template-columns: 1fr;
  }
  .hm-related__list a {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .hm-home-hero {
    min-height: 0;
    padding: 3.25rem 1.15rem 3rem;
  }
  .hm-card-grid,
  .hm-trust-row,
  .hm-post-grid .wp-block-post-template,
  .hm-site-footer__inner {
    grid-template-columns: 1fr;
  }
  .hm-home-section .wp-block-latest-posts li {
    grid-template-columns: 96px 1fr;
    gap: 0.85rem;
  }
  .hm-home-section .wp-block-latest-posts img {
    width: 96px;
    height: 72px;
  }
  .single .site-main > article,
  .single-post .site-main > article,
  .single article.post {
    margin: 0.75rem 0.55rem 2rem;
    border-radius: 14px;
  }
  .single .hero-section,
  .single .entry-header,
  .single .entry-content {
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
  }
  .hm-section-heading,
  .hm-site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }
  .hm-section-heading h2 {
    padding-bottom: 0;
  }
  .hm-site-footer__inner {
    gap: 1.5rem;
    padding-top: 2.5rem;
  }
}

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

@media print {
  .ct-header,
  .ct-footer,
  .hm-site-footer,
  .hm-related,
  .hm-cta,
  .hm-actions,
  .hm-chips {
    display: none !important;
  }
  body,
  body.single {
    background: #fff !important;
  }
  .single .site-main > article,
  .single article.post {
    max-width: none !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .hm-callout,
  .hm-quick,
  .hm-takeaways,
  table,
  figure {
    break-inside: avoid;
  }
}
