/* =========================================================
   MHT CONTEXT SHELL
   File: assets/css/mht-context-hero.css

   Purpose:
   - Reusable dark/glassy shell for area hubs and article heroes
   - One outer shell only
   - Full-shell ghost image on ::before
   - Even colour wash overlay on ::after
   - Optional guide/action pill with area accent only on hover

   Important:
   - This file owns the reusable context hero shell and inner hero layout.
   - Area landing should render through .mht-context-shell in PHP.
   ========================================================= */


/* =========================================================
   01. ROOT TOKENS
   ========================================================= */

:root{
  --mht-context-shell-page-pad: clamp(10px, 1.4vw, 20px);
  --mht-context-shell-pad: var(--space-sm);

  --mht-context-shell-width: min(
    calc(100vw - (var(--mht-context-shell-page-pad) * 2)),
    1440px
  );

  --mht-context-shell-radius: calc(var(--radius-lg) + 8px);
  --mht-context-shell-margin-bottom: clamp(12px, 1.4vw, 20px);

  --mht-context-shell-band-a: var(--color-area-hub-money-band-a);
  --mht-context-shell-band-b: var(--color-area-hub-money-band-b);
  --mht-context-shell-border: var(--color-area-hub-money-border);

  --mht-context-shell-image: none;
  --mht-context-shell-image-position: 100% 34%;
  --mht-context-shell-image-opacity: 0.44;
  --mht-context-shell-image-scale: 1.5;

  --mht-context-shell-shadow:
    0 14px 30px rgba(22,34,53,0.16),
    inset 0 1px 0 rgba(255,255,255,0.20);

  --mht-context-shell-text: var(--color-dark);
  --mht-context-shell-text-soft: var(--color-dark-muted);
  --mht-context-shell-text-invert: var(--color-white);

  --mht-context-shell-accent: var(--color-tech-accent);
  --mht-context-hero-pill-accent: var(--mht-context-shell-accent);

  --mht-context-shell-card-glass: color-mix(
    in srgb,
    var(--color-white) 18%,
    transparent
  );

  --mht-context-shell-card-glass-strong: color-mix(
    in srgb,
    var(--color-white) 28%,
    transparent
  );

  --mht-context-shell-card-glass-border: color-mix(
    in srgb,
    var(--color-white) 34%,
    transparent
  );

  --mht-context-shell-image-fade-left-opacity: 0.2;
  --mht-context-shell-image-fade-left-stop: 0%;
  --mht-context-shell-image-fade-clear-start: 34%;
  --mht-context-shell-image-fade-clear-end: 100%;

  /* -------------------------
     Hero / guide pill tokens
     Normal state stays neutral glass.
     Accent appears only on hover/focus.
     ------------------------- */

  --mht-context-hero-pill-pad-y: var(--space-xs);
  --mht-context-hero-pill-pad-x: var(--space-sm);
  --mht-context-hero-pill-radius: var(--radius-sm);

  --mht-context-hero-pill-bg: color-mix(
    in srgb,
    var(--color-white) 16%,
    transparent
  );

  --mht-context-hero-pill-bg-hover: color-mix(
    in srgb,
    var(--mht-context-hero-pill-accent) 28%,
    var(--color-white) 16%
  );

  --mht-context-hero-pill-border: color-mix(
    in srgb,
    var(--color-white) 36%,
    transparent
  );

  --mht-context-hero-pill-border-hover: color-mix(
    in srgb,
    var(--mht-context-hero-pill-accent) 76%,
    var(--color-white) 18%
  );

  --mht-context-hero-pill-text: var(--mht-context-shell-text-invert);
  --mht-context-hero-pill-text-hover: var(--mht-context-shell-text-invert);

  --mht-context-hero-pill-shadow:
    0 10px 22px color-mix(
      in srgb,
      var(--mht-context-shell-band-a) 22%,
      transparent
    );
}


/* =========================================================
   02. AREA CONTEXT TOKEN MAPPING
   ========================================================= */

/* Money context */
.hotips-site-theme--money .mht-context-shell,
.hotips-area-hub--money .mht-context-shell,
.mht-context-shell--money{
  --mht-context-shell-band-a: var(--color-area-hub-money-band-a);
  --mht-context-shell-band-b: var(--color-area-hub-money-band-b);
  --mht-context-shell-border: var(--color-area-hub-money-border);

  --mht-context-shell-accent: var(--color-tech-accent);
  --mht-context-hero-pill-accent: var(--color-tech-accent);
}

/* Wellness context */
.hotips-site-theme--wellness .mht-context-shell,
.hotips-area-hub--wellness .mht-context-shell,
.mht-context-shell--wellness{
  --mht-context-shell-band-a: var(--color-area-hub-wellness-band-a);
  --mht-context-shell-band-b: var(--color-area-hub-wellness-band-b);
  --mht-context-shell-border: var(--color-area-hub-wellness-border);

  --mht-context-shell-accent: var(
    --color-wellness-terracotta,
    var(--color-wellness-accent)
  );

  --mht-context-hero-pill-accent: var(
    --color-wellness-terracotta,
    var(--color-wellness-accent)
  );
}


/* =========================================================
   03. CONTEXT HERO ACTION / GUIDE PILL
   ========================================================= */

.mht-context-hero__actions{
  position: relative;
  z-index: 2;

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-xs);

  width: 100%;
  max-width: 100%;
  min-width: 0;

  margin-top: var(--space-md);
  box-sizing: border-box;
}

.mht-context-hero__actions--bottom{
  margin-top: var(--space-sm);
}

.mht-context-hero__actions--bottom + .mht-context-hero__after{
  margin-top: var(--space-sm);
}

.mht-context-hero__actions--bottom .mht-context-hero__pill{
  max-width: 100%;
}

.mht-context-hero__pill,
.mht-context-hero__pill:visited{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);

  width: fit-content;
  max-width: 100%;

  padding:
    var(--mht-context-hero-pill-pad-y)
    var(--mht-context-hero-pill-pad-x);

  border-radius: var(--mht-context-hero-pill-radius);
  border: 1px solid var(--mht-context-hero-pill-border);
  background: var(--mht-context-hero-pill-bg);

  color: var(--mht-context-hero-pill-text);

  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 400;
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-ui, 0.025em);
  text-decoration: none;

  box-shadow: var(--mht-context-hero-pill-shadow);

  backdrop-filter: blur(var(--mht-context-shell-blur, 12px));
  -webkit-backdrop-filter: blur(var(--mht-context-shell-blur, 12px));

  transition:
    background var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.mht-context-hero__pill:hover,
.mht-context-hero__pill:focus-visible{
  background: var(--mht-context-hero-pill-bg-hover);
  border-color: var(--mht-context-hero-pill-border-hover);
  color: var(--mht-context-hero-pill-text-hover);
  text-decoration: none;
  transform: translateY(var(--motion-lift-xs, -1px));
}

.mht-context-hero__pill:focus-visible{
  outline: 2px solid color-mix(
    in srgb,
    var(--mht-context-hero-pill-accent) 80%,
    var(--color-white) 20%
  );
  outline-offset: 3px;
}

.mht-context-hero__pill::after{
  content: "›";
  display: inline-block;
  font-size: 1.15em;
  line-height: 1;
  transform: translateY(-0.02em);
}

/* =========================================================
   CONTEXT HERO HUB ICON PILLS
   - Used for Money Growth / Wellness hero tabs
   - Keeps existing glassy pill style
   ========================================================= */

.mht-context-hero__pill--hub{
  gap: var(--space-xs);
  padding-left: var(--space-xs);
}

.mht-context-hero__pill-icon{
  display: inline-flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;
  overflow: hidden;

  border-radius: var(--radius-pill);
  background: color-mix(
    in srgb,
    var(--color-white) 72%,
    transparent
  );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.48),
    0 4px 10px rgba(22,34,53,0.14);
}

.mht-context-hero__pill-icon img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.mht-context-hero__pill-label{
  display: inline-block;
  min-width: 0;
}

/* Section guide hub buttons scroll down rather than navigate forward. */
.mht-context-hero__pill--down::after{
  content: "↓";
  font-size: 1em;
}

/* Make the wellness hub pill visually match the lotus icon better. */
.mht-context-hero__pill--wellness .mht-context-hero__pill-icon{
  background: color-mix(
    in srgb,
    var(--color-wellness-accent, #9fbf9b) 42%,
    var(--color-white) 58%
  );
}

/* Make the money hub pill visually match the growth icon better. */
.mht-context-hero__pill--money .mht-context-hero__pill-icon{
  background: color-mix(
    in srgb,
    var(--color-tech-accent) 34%,
    var(--color-area-hub-money-band-a) 18%,
    var(--color-white) 48%
  );
}

@media (max-width: 640px){
  .mht-context-hero__pill--hub{
    width: 100%;
    justify-content: flex-start;
  }

  .mht-context-hero__pill--hub::after{
    margin-left: auto;
  }
}


/* =========================================================
   04. MAIN REUSABLE SHELL
   ========================================================= */

.mht-context-shell{
  position: relative;
  top: auto;
  z-index: 2;

  box-sizing: border-box;
  isolation: isolate;
  overflow: hidden;

  width: var(--mht-context-shell-width);
  max-width: var(--mht-context-shell-width);

  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--mht-context-shell-margin-bottom);

  padding: var(--mht-context-shell-pad);

  border-radius: var(--mht-context-shell-radius);
  border: 1px solid color-mix(
    in srgb,
    var(--mht-context-shell-border) 48%,
    rgba(255,255,255,0.34)
  );

  background:
    linear-gradient(
      135deg,
      var(--mht-context-shell-band-a) 0%,
      color-mix(
        in srgb,
        var(--mht-context-shell-band-b) 72%,
        var(--mht-context-shell-band-a) 28%
      ) 48%,
      color-mix(
        in srgb,
        var(--mht-context-shell-band-a) 88%,
        var(--mht-context-shell-band-b) 12%
      ) 100%
    );

  box-shadow: var(--mht-context-shell-shadow);

  backdrop-filter: blur(16px) saturate(122%);
  -webkit-backdrop-filter: blur(16px) saturate(122%);
}


/* =========================================================
   05. SHELL GHOST IMAGE + WASH
   ========================================================= */

.mht-context-shell::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background-image: var(--mht-context-shell-image);
  background-size: cover;
  background-position: var(--mht-context-shell-image-position);
  background-repeat: no-repeat;
  background-origin: border-box;
  background-clip: border-box;

  opacity: var(--mht-context-shell-image-opacity);

  filter:
    saturate(118%)
    contrast(1.10)
    brightness(1);

  transform: scale(var(--mht-context-shell-image-scale));
  transform-origin: right center;

  mask-image:
    linear-gradient(
      90deg,
      rgba(0,0,0,var(--mht-context-shell-image-fade-left-opacity)) var(--mht-context-shell-image-fade-left-stop),
      rgba(0,0,0,var(--mht-context-shell-image-fade-left-opacity)) 14%,
      rgba(0,0,0,1) var(--mht-context-shell-image-fade-clear-start),
      rgba(0,0,0,1) var(--mht-context-shell-image-fade-clear-end)
    );

  -webkit-mask-image:
    linear-gradient(
      90deg,
      rgba(0,0,0,var(--mht-context-shell-image-fade-left-opacity)) var(--mht-context-shell-image-fade-left-stop),
      rgba(0,0,0,var(--mht-context-shell-image-fade-left-opacity)) 14%,
      rgba(0,0,0,1) var(--mht-context-shell-image-fade-clear-start),
      rgba(0,0,0,1) var(--mht-context-shell-image-fade-clear-end)
    );
}

.mht-context-shell::after{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;

  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--mht-context-shell-band-a) 30%, transparent) 0%,
      color-mix(in srgb, var(--mht-context-shell-band-b) 26%, transparent) 52%,
      color-mix(in srgb, var(--mht-context-shell-band-a) 30%, transparent) 100%
    ),
    radial-gradient(
      circle at 86% 12%,
      color-mix(in srgb, var(--color-white) 10%, transparent) 0%,
      transparent 10%
    );
}

.mht-context-shell > *{
  position: relative;
  z-index: 2;
}

/* =========================================================
   06. CONTEXT HERO INNER LAYOUT
   - First-pass standalone layout
   - Removes dependency on the previous area-landing bridge classes
   ========================================================= */

.mht-context-hero__inner{
  position: relative;
  isolation: isolate;
  overflow: visible;

  display: grid;
  grid-template-columns: minmax(210px, 0.20fr) minmax(0, 0.80fr);
  align-items: stretch;
  gap: var(--space-lg);

  min-height: clamp(190px, 15vw, 245px);
  padding: var(--space-sm);

  border: 0;
  border-radius: 0;

  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.mht-context-hero__copy,
.mht-context-hero__media{
  position: relative;
  z-index: 1;
  min-width: 0;
}

.mht-context-hero__copy{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-xs);

  max-width: 32ch;
}

.mht-context-hero__eyebrow{
  display: inline-flex;
  align-items: center;

  min-height: calc(var(--space-xl) + var(--space-xs));
  margin: var(--space-none) var(--space-none) var(--space-xxs);
  padding: var(--space-none) var(--space-sm);

  border-radius: var(--radius-pill);
  border: var(--border-width-thin) var(--border-style-standard) color-mix(
    in srgb,
    var(--color-white) 22%,
    transparent
  );

  background: color-mix(in srgb, var(--color-white) 7%, transparent);
  color: color-mix(in srgb, var(--color-white) 88%, var(--area-landing-soft) 12%);

  font-family: var(--font-body);
  font-size: var(--font-size-ui-xs);
  font-weight: 900;
  letter-spacing: var(--article-card-ribbon-letter-spacing, 0.08em);
  line-height: var(--line-height-ui);
  text-transform: uppercase;
}

.mht-context-hero__title{
  max-width: 13ch;
  margin: var(--space-none);

  display: block;
  overflow: visible;

  color: var(--color-white);
  font-family: var(--font-display);
  font-size: var(--font-size-site-h2);
  font-weight: 750;
  line-height: var(--line-height-heading);
  letter-spacing: -0.035em;
}

.mht-context-hero__intro{
  max-width: 31ch;
  margin: var(--space-none);

  display: block;
  overflow: visible;

  color: color-mix(in srgb, var(--color-white) 88%, var(--area-landing-soft) 12%);
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  font-weight: 450;
  line-height: var(--line-height-ui);
}

.mht-context-hero__media{
  position: relative;
  isolation: isolate;
  overflow: hidden;

  justify-self: stretch;
  align-self: center;

  width: 100%;
  height: clamp(180px, 16vw, 250px);
  min-height: 0;
  max-height: 250px;

  margin-right: var(--space-none);

  border-radius: var(--radius-md);
  border: var(--border-width-thin) var(--border-style-standard) color-mix(
    in srgb,
    var(--color-white) 20%,
    transparent
  );

  background: transparent;

  box-shadow:
    var(--shadow-md),
    inset 0 var(--border-width-thin) 0 color-mix(in srgb, var(--color-white) 18%, transparent);
}

.mht-context-hero__media::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;

  border-radius: inherit;
  pointer-events: none;

  background-image: var(--mht-context-shell-image);
  background-size: auto 101%;
  background-position: 100% center;
  background-repeat: no-repeat;

  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.08) 6%,
    rgba(0,0,0,0.42) 15%,
    rgba(0,0,0,0.78) 24%,
    rgba(0,0,0,1) 34%,
    rgba(0,0,0,1) 100%
  );

  mask-image: linear-gradient(
    to right,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.08) 6%,
    rgba(0,0,0,0.42) 15%,
    rgba(0,0,0,0.78) 24%,
    rgba(0,0,0,1) 34%,
    rgba(0,0,0,1) 100%
  );

  -webkit-mask-mode: alpha;
  mask-mode: alpha;

  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;

  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.mht-context-hero__media::after{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;

  border-radius: inherit;
  pointer-events: none;

  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--area-landing-band-a) 2%, transparent) 0%,
      transparent 24%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--color-white) 7%, transparent) 0%,
      transparent 48%,
      color-mix(in srgb, var(--area-landing-band-a) 5%, transparent) 100%
    );
}

@media (max-width: 1180px){
  .mht-context-hero__inner{
    grid-template-columns: minmax(210px, 0.24fr) minmax(0, 0.76fr);
  }

  .mht-context-hero__title{
    max-width: 12ch;
  }

  .mht-context-hero__intro{
    max-width: 30ch;
  }
}

@media (max-width: 980px){
  .mht-context-hero__inner{
    grid-template-columns: 1fr;
    min-height: 0;
    gap: var(--space-md);
    padding: var(--space-sm);
  }

  .mht-context-hero__copy{
    max-width: none;
  }

  .mht-context-hero__title{
    max-width: 14ch;
    font-size: var(--font-size-site-h2);
  }

  .mht-context-hero__intro{
    max-width: 42ch;
  }

  .mht-context-hero__media{
    justify-self: stretch;

    width: 100%;
    height: clamp(150px, 28vw, 205px);
    min-height: 0;
    max-height: 205px;

    margin-right: var(--space-none);
    border-radius: var(--radius-md);
  }
}

@media (max-width: 620px){
  .mht-context-hero__inner{
    padding: var(--space-sm);
  }

  .mht-context-hero__title{
    max-width: 13ch;
  }

  .mht-context-hero__intro{
    max-width: 36ch;
    font-size: var(--font-size-ui);
  }

  .mht-context-hero__media{
    height: clamp(135px, 34vw, 175px);
    max-height: 175px;
  }
}

/* =========================================================
   07. CONTEXT HERO AFTER SLOT
   - Optional area-specific content inside the global shell
   - Used for area hub content menu + filter rail
   ========================================================= */

.mht-context-hero__after{
  position: relative;
  z-index: 2;

  display: grid;
  gap: var(--space-sm);

  margin-top: var(--space-sm);
}

.mht-context-hero__after > *{
  width: 100%;
  max-width: 100%;
}

/* =========================================================
   ARTICLE CONTEXT HERO FOOTER ROW
   - Card-footer-inspired single-line row
   - Left: area logo + MyHotips Team
   - Right: views pill + display-only rating
   ========================================================= */

.mht-context-hero--article{

  --mht-article-footer-pill-height: 28px;
  --mht-article-footer-icon-size: 24px;
  --mht-article-footer-hub-size: 28px;
  --mht-article-footer-pad-y: var(--space-xs);
  --mht-article-footer-pad-x: var(--space-sm);
  margin-top: var(--space-xl);
    --mht-context-shell-margin-bottom: var(--space-xs);

  --mht-article-footer-accent: var(--color-tech-accent);
  --mht-article-footer-divider: color-mix(
    in srgb,
    var(--color-neutral-muted) 42%,
    transparent
  );

  --mht-article-footer-glass: color-mix(
    in srgb,
    var(--color-white) 16%,
    transparent
  );

  --mht-article-footer-glass-strong: color-mix(
    in srgb,
    var(--color-white) 22%,
    transparent
  );

  --mht-article-footer-border: color-mix(
    in srgb,
    var(--color-white) 26%,
    transparent
  );

  --mht-article-footer-pill-bg: color-mix(
    in srgb,
    var(--color-white) 12%,
    transparent
  );

  --mht-article-footer-pill-bg-hover: color-mix(
    in srgb,
    var(--color-white) 16%,
    transparent
  );

  --mht-article-footer-pill-border: color-mix(
    in srgb,
    var(--color-white) 18%,
    transparent
  );

  --mht-article-footer-text: color-mix(
    in srgb,
    var(--color-white) 92%,
    transparent
  );

  --mht-article-footer-text-soft: color-mix(
    in srgb,
    var(--color-white) 68%,
    transparent
  );

  --mht-article-footer-avatar-radius: var(--radius-xs);
}

.mht-context-hero--article.mht-context-hero--money,
.mht-article-hero-footer--money{
  --mht-article-footer-accent: var(--color-tech-accent);

  --mht-article-footer-pill-bg: color-mix(
    in srgb,
    var(--color-area-hub-money-pill-bg, var(--button-blue-soft-bg)) 32%,
    transparent
  );

  --mht-article-footer-pill-bg-hover: color-mix(
    in srgb,
    var(--color-area-hub-money-pill-bg, var(--button-blue-soft-bg)) 42%,
    transparent
  );
}

.mht-context-hero--article.mht-context-hero--wellness,
.mht-article-hero-footer--wellness{
  --mht-article-footer-accent: var(--color-wellness-accent);

  --mht-article-footer-pill-bg: color-mix(
    in srgb,
    var(--color-area-hub-wellness-pill-bg, var(--color-wellness-accent-soft)) 42%,
    transparent
  );

  --mht-article-footer-pill-bg-hover: color-mix(
    in srgb,
    var(--color-area-hub-wellness-pill-bg, var(--color-wellness-accent-soft)) 54%,
    transparent
  );
}

body.admin-bar .mht-context-hero--article{
  margin-top: var(--space-xl);
}

.mht-context-hero--article .mht-context-hero__after{
  margin-top: var(--space-sm);
}

/* Footer glass row */
.mht-article-hero-footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: var(--article-card-footer-gap, var(--space-md));

  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;

  padding: var(--space-sm);

  border-top: var(--border-width-thin) var(--border-style-standard) var(--mht-article-footer-divider);
  border-right: var(--border-width-thin) var(--border-style-standard) var(--mht-article-footer-border);
  border-bottom: var(--border-width-thin) var(--border-style-standard) var(--mht-article-footer-border);
  border-left: var(--border-width-thin) var(--border-style-standard) var(--mht-article-footer-border);

  border-radius: var(--radius-md);

  background:
    linear-gradient(
      180deg,
      var(--mht-article-footer-glass-strong),
      var(--mht-article-footer-glass)
    );

  overflow: hidden;

  backdrop-filter: blur(var(--mht-context-shell-blur, 12px));
  -webkit-backdrop-filter: blur(var(--mht-context-shell-blur, 12px));
}

/* Left brand area */
.mht-article-hero-footer__brand{
  display: flex;
  align-items: center;
  min-width: 0;
  gap: var(--article-card-meta-gap, var(--space-sm));
}

.mht-article-hero-footer__avatar{
  display: inline-flex;
  flex: 0 0 var(--mht-article-footer-icon-size);
  align-items: center;
  justify-content: center;

  width: var(--mht-article-footer-icon-size);
  height: var(--mht-article-footer-icon-size);

  overflow: hidden;

  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;

  box-shadow: none;
}

.mht-article-hero-footer__avatar img{
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}

.mht-article-hero-footer__avatar-initial{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  border-radius: inherit;
  background: color-mix(in srgb, var(--color-white) 12%, transparent);
  color: var(--color-white);

  font-family: var(--font-body);
  font-size: var(--font-size-ui-xs);
  font-weight: 850;
  line-height: var(--line-height-ui);
}

.mht-article-hero-footer__brand-text{
  display: inline-flex;
  align-items: center;
  min-width: 0;
  line-height: 1;
}

.mht-article-hero-footer__brand-name{
  display: inline-block;
  overflow: hidden;

  color: var(--mht-article-footer-text);

  font-family: var(--font-body);
  font-size: var(--font-size-ui-xs);
  font-weight: 850;
  line-height: 1;

  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Right action group */
.mht-article-hero-footer__actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 1 auto;
  min-width: 0;
  gap: var(--space-xs);
  margin-left: auto;
  line-height: 1;
}

.mht-article-hero-footer__team{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: var(--mht-article-footer-pill-height);
  gap: var(--space-xs);

  padding:
    var(--space-xxs)
    var(--space-sm)
    var(--space-xxs)
    var(--space-xxs);

  border: var(--border-width-thin) var(--border-style-standard) var(--mht-article-footer-pill-border);
  border-radius: var(--radius-pill);

  background: var(--mht-article-footer-pill-bg);
  color: var(--mht-article-footer-text);

  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
  overflow: hidden;
}

.mht-article-hero-footer__team:hover{
  background: var(--mht-article-footer-pill-bg-hover);
}
/* Views pill */
.mht-article-hero-footer__views{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;
  min-height: 0;
  height: var(--mht-article-footer-pill-height);
  max-width: 100%;

  padding: 0 var(--space-sm);

  border: var(--border-width-thin) var(--border-style-standard) var(--mht-article-footer-pill-border);
  border-radius: var(--radius-pill);

  background: var(--mht-article-footer-pill-bg);
  color: var(--mht-article-footer-text);

  font-family: var(--font-body);
  font-size: var(--font-size-ui-xs);
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;

  box-shadow: none;
  overflow: hidden;
}

.mht-article-hero-footer__views:hover{
  background: var(--mht-article-footer-pill-bg-hover);
}

.mht-article-hero-footer__views,
.mht-article-hero-footer__views *{
  box-sizing: border-box !important;
}

.mht-article-hero-footer__views *{
  display: inline !important;

  min-width: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  height: auto !important;

  margin: 0 !important;
  padding: 0 !important;

  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;

  color: inherit !important;
  font: inherit !important;
  line-height: inherit !important;
}

/* Display-only rating inside article hero footer */
.mht-article-hero-footer .my-blog-rating-display{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: var(--space-xs) !important;

  width: fit-content !important;
  max-width: 100% !important;
   box-sizing: border-box !important;
  min-height: 0 !important;
  height: var(--mht-article-footer-pill-height) !important;

  margin: 0 !important;
  padding: 0 var(--space-sm) !important;

  border: var(--border-width-thin) var(--border-style-standard) var(--mht-article-footer-pill-border) !important;
  border-radius: var(--radius-pill) !important;

  background: var(--mht-article-footer-pill-bg) !important;
  box-shadow: none !important;

  color: var(--mht-article-footer-text) !important;

  font-family: var(--font-body) !important;
  font-size: var(--font-size-ui-xs) !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.mht-article-hero-footer .my-blog-rating-display:hover{
  background: var(--mht-article-footer-pill-bg-hover) !important;
}

/* Rating stars */
.mht-article-hero-footer .my-blog-rating-display__stars{
  display: inline-flex !important;
  align-items: center !important;
  gap: 1px !important;
  width: auto !important;
  line-height: 1 !important;
}

.mht-article-hero-footer .my-blog-rating-display__star{
  position: relative !important;
  display: inline-block !important;

  margin: 0 !important;
  padding: 0 !important;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;

  font-size: 9px !important;
  line-height: 1 !important;
}

.mht-article-hero-footer .my-blog-rating-display__star.is-full{
  color: var(--mht-article-footer-accent) !important;
}

.mht-article-hero-footer .my-blog-rating-display__star.is-empty,
.mht-article-hero-footer .my-blog-rating-display__star.is-half{
  color: color-mix(
    in srgb,
    var(--mht-article-footer-divider) 70%,
    var(--color-white) 30%
  ) !important;
}

.mht-article-hero-footer .my-blog-rating-display__star.is-half::after{
  content: "★";
  position: absolute;
  inset: 0 auto 0 0;

  width: 50%;
  overflow: hidden;

  color: var(--mht-article-footer-accent);
}

/* Rating text */
.mht-article-hero-footer .my-blog-rating-display__text{
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 3px !important;

  width: auto !important;
  max-width: 100% !important;

  color: var(--mht-article-footer-text) !important;
  font-size: var(--font-size-ui-xs) !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.mht-article-hero-footer .my-blog-rating-display__average{
  color: var(--mht-article-footer-text) !important;
  font-size: inherit !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}

.mht-article-hero-footer .my-blog-rating-display__count,
.mht-article-hero-footer .my-blog-rating-display__thanks{
  color: var(--mht-article-footer-text-soft) !important;
  font-size: inherit !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

/* New / no-rating text */
.mht-article-hero-footer .my-blog-rating-display__pill,
.mht-article-hero-footer .my-blog-rating-display__pill--new{
  display: inline !important;

  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;

  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;

 color: var(--mht-article-footer-accent) !important;

  font-family: var(--font-body) !important;
  font-size: inherit !important;
  font-weight: 900 !important;
  line-height: inherit !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

/* Article hero footer custom rating wording */
.mht-article-hero-footer__rated-label{
  color: var(--mht-article-footer-text) !important;
  font-family: var(--font-body) !important;
  font-size: inherit !important;
  font-weight: 850 !important;
  line-height: inherit !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.mht-article-hero-footer__rated-new{
  color: var(--mht-article-footer-accent) !important;
  font-family: var(--font-body) !important;
  font-size: inherit !important;
  font-weight: 900 !important;
  line-height: inherit !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

/* Mobile */
@media (max-width: 720px){
  .mht-context-hero--article{
    margin-top: var(--space-md);
  }

  .mht-article-hero-footer{
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .mht-article-hero-footer__actions{
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
}

/* Hub links */
.mht-article-hero-footer__hub-links{
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: var(--space-xxs);
}

.mht-article-hero-footer__hub-link{
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;

  width: var(--article-card-brand-size, 30px);
  height: var(--article-card-brand-size, 30px);

  border-radius: var(--radius-pill);
  text-decoration: none;

  background: var(--mht-article-footer-pill-bg);
  border: var(--border-width-thin) var(--border-style-standard) color-mix(
    in srgb,
    var(--mht-article-footer-accent) 32%,
    var(--color-white) 18%
  );

  overflow: hidden;

  transition:
    background var(--duration-fast) var(--ease-soft),
    border-color var(--duration-fast) var(--ease-soft),
    transform var(--duration-fast) var(--ease-soft);
}

.mht-article-hero-footer__hub-link:hover,
.mht-article-hero-footer__hub-link:focus-visible{
  background: var(--mht-article-footer-pill-bg-hover);
  border-color: color-mix(
    in srgb,
    var(--mht-article-footer-accent) 68%,
    var(--color-white) 18%
  );
  transform: translateY(var(--motion-lift-xs, -1px));
  outline: none;
}

.mht-article-hero-footer__hub-link--money{
  border-color: color-mix(
    in srgb,
    var(--color-tech-accent) 42%,
    var(--color-white) 18%
  );
}

.mht-article-hero-footer__hub-link--wellness{
  border-color: color-mix(
    in srgb,
    var(--color-wellness-accent) 42%,
    var(--color-white) 18%
  );
}

.mht-article-hero-footer__hub-link--money:hover,
.mht-article-hero-footer__hub-link--money:focus-visible{
  border-color: color-mix(
    in srgb,
    var(--color-tech-accent) 74%,
    var(--color-white) 16%
  );
}

.mht-article-hero-footer__hub-link--wellness:hover,
.mht-article-hero-footer__hub-link--wellness:focus-visible{
  border-color: color-mix(
    in srgb,
    var(--color-wellness-accent) 74%,
    var(--color-white) 16%
  );
}

.mht-article-hero-footer__hub-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;
  overflow: hidden;

  border-radius: inherit;
}

.mht-article-hero-footer__hub-icon img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* =========================================================
   09. SECTION GUIDE CONTEXT HERO
   - Uses the standalone context hero layout above
   - Non-sticky topper only
   ========================================================= */

.mht-context-hero--section-guide,
.mht-context-hero--section-guide-story{
  position: relative;
  top: auto;
  margin-top: var(--space-xl);
  --mht-context-shell-margin-bottom: var(--space-xs);
}

@media (max-width: 720px){
  .mht-context-hero--section-guide,
  .mht-context-hero--section-guide-story{
    margin-top: var(--space-md);
  }
}

/* =========================================================
   AREA / CONTEXT HERO TEXT SAFETY
   - Keep shared hero text readable.
   ========================================================= */

.mht-context-hero .mht-context-hero__title,
.mht-context-hero .mht-context-hero__intro{
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
}

/* =========================================================
   CONTEXT HERO BOTTOM ACTION ROW
   - Keeps hero actions inside the shell but outside title/excerpt copy
   - Fixes section-guide/story buttons overflowing beside the hero text
   ========================================================= */

@media (max-width: 720px){
  .mht-context-hero__actions--bottom{
    align-items: stretch;
  }

  .mht-context-hero__actions--bottom .mht-context-hero__pill{
    width: 100%;
  }
}

/* =========================================================
   CONTEXT HERO TOP GAP FIX
   - Matches section guide/story heroes to normal article hero spacing
   - Fixes story page sitting too close under the sticky topbar
   ========================================================= */

.mht-context-hero--section-guide,
.mht-context-hero--section-guide-story{
  margin-top: var(--space-xl);
}

body.admin-bar .mht-context-hero--section-guide,
body.admin-bar .mht-context-hero--section-guide-story{
  margin-top: var(--space-xl);
}

/* =========================================================
   FALLBACK HERO IMAGE STATE
   - Only affects heroes that are using the fallback artwork
   - Normal featured-image heroes remain unchanged
   ========================================================= */

.mht-context-hero--uses-fallback-image{
  --mht-context-shell-image-opacity: 0.34;
  --mht-context-shell-image-scale: 1.16;
  --mht-context-shell-image-position: center center;

  --mht-context-shell-image-fade-left-opacity: 0;
  --mht-context-shell-image-fade-left-stop: 0%;
  --mht-context-shell-image-fade-clear-start: 20%;
  --mht-context-shell-image-fade-clear-end: 100%;
}

.mht-context-hero--uses-fallback-image.mht-context-shell::before{
  filter:
    saturate(92%)
    contrast(0.96)
    brightness(1.04);
}

@media (max-width: 900px){
  .mht-context-hero--uses-fallback-image{
    --mht-context-shell-image: var(--mht-context-shell-fallback-tablet-image);
    --mht-context-shell-image-opacity: 0.30;
    --mht-context-shell-image-scale: 1.04;
    --mht-context-shell-image-position: center center;
  }

  .mht-context-hero--uses-fallback-image .mht-context-hero__media::before{
    background-image: var(--mht-context-shell-fallback-tablet-image);
    background-size: cover;
    background-position: center center;
  }
}

/* =========================================================
   CONTEXT HERO LEFT TITLE-SAFE WASH
   - More reliable than masking individual ghost image layers
   - Makes the left side visually behave like a 20% ghost area
   ========================================================= */

:root{
  --mht-context-shell-left-wash-strength: 82%;
  --mht-context-shell-left-wash-hold: 18%;
  --mht-context-shell-left-wash-clear: 42%;
}

.mht-context-shell::after{
  background:
    linear-gradient(
      90deg,
      color-mix(
        in srgb,
        var(--mht-context-shell-band-a) var(--mht-context-shell-left-wash-strength),
        transparent
      ) 0%,
      color-mix(
        in srgb,
        var(--mht-context-shell-band-a) var(--mht-context-shell-left-wash-strength),
        transparent
      ) var(--mht-context-shell-left-wash-hold),
      color-mix(
        in srgb,
        var(--mht-context-shell-band-a) 28%,
        transparent
      ) var(--mht-context-shell-left-wash-clear),
      transparent 100%
    ),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--mht-context-shell-band-a) 30%, transparent) 0%,
      color-mix(in srgb, var(--mht-context-shell-band-b) 26%, transparent) 52%,
      color-mix(in srgb, var(--mht-context-shell-band-a) 30%, transparent) 100%
    ),
    radial-gradient(
      circle at 86% 12%,
      color-mix(in srgb, var(--color-white) 10%, transparent) 0%,
      transparent 10%
    );
}