/* Shared public design rules. Applies to React content and the archive templates.
   CMS panels deliberately keep their own controls. */
:root {
  --ui-lime: #96ff00;
  --ui-duration: 240ms;
  --ui-ease: cubic-bezier(.22, 1, .36, 1);
  --ui-header-height: 4.25rem;
  --nav-h: var(--ui-header-height);
}
html { scroll-padding-top: calc(var(--ui-header-height) + 1rem); }

/* An opaque surface prevents content and brand colours from blending. */
.nav.nav.is-scrolled, .navbar.navbar, .mind-site-header.mind-site-header {
  color: #000;
  background: #fff;
  mix-blend-mode: normal;
  isolation: isolate;
  box-shadow: 0 1px 0 rgb(0 0 0 / 8%);
}
.nav.nav { transition: background-color var(--ui-duration) ease, box-shadow var(--ui-duration) ease; }
.navbar.navbar { top: 0; z-index: 101; }
.navbar-controller.navbar-controller { color: #000; mix-blend-mode: normal; }
.mind-site-header.mind-site-header { position: sticky; top: 0; z-index: 101; }
.mind-site-header.mind-site-header .mind-site-header__logo img { filter: invert(1); }
.mind-site-header.mind-site-header .mind-site-header__inner { min-height: var(--ui-header-height); }
.mind-site-header.mind-site-header .mind-site-header__logo { width: 10rem; }
.mind-site-header.mind-site-header + main .insights-overview { margin-top: 0; padding-top: 0; }
.nav-link.w-nav-link::before, .nav__link::before, .mind-site-header__nav-marker { background: var(--ui-lime); mix-blend-mode: normal; }
.nav-link.w-nav-link:hover::before, .nav-link.w-nav-link:focus-visible::before,
.nav__link:hover::before, .nav__link:focus-visible::before,
.mind-site-header__nav-link:hover .mind-site-header__nav-marker,
.mind-site-header__nav-link:focus-visible .mind-site-header__nav-marker { opacity: 1; transform: rotate(-.7deg) scaleX(1); }

/* A real brush wrapped around the chosen word, never a percentage of its h2. */
.hivemind-marker-title.hivemind-marker-title::before { content: none; }
.mind-marker-word {
  position: relative;
  display: inline-block;
  isolation: isolate;
  white-space: nowrap;
}
.mind-marker-word::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 36% -.06em 0;
  background: var(--ui-lime);
  pointer-events: none;
  transform: rotate(-.7deg);
  mask: url('/assets/brand/hivemind/markers/headline-highlight.webp') center / 100% 100% no-repeat;
  -webkit-mask: url('/assets/brand/hivemind/markers/headline-highlight.webp') center / 100% 100% no-repeat;
}

/* Equal, naturally growing entries, in reading order. No masonry or forced crops. */
.insights-overview .insights-overview__inner { padding-top: clamp(1.5rem, 3vw, 3rem); }
.insights-overview .insights-overview__intro {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding: 1rem 0 clamp(2.5rem, 4vw, 4rem);
}
.insights-overview .insights-overview__intro h1 { font-size: clamp(2.75rem, 4.6vw, 5rem); line-height: 1.02; }
.insights-overview .insights-overview__intro p { line-height: 1.5; max-width: 36ch; padding-top: .4rem; }
.insights-overview .insights-overview__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  grid-auto-flow: row;
  gap: 2.5rem 1.75rem;
  border: 0;
}
.insights-overview .insights-overview-card { border: 0; background: transparent; }
.insights-overview .insights-overview-card > a { background: #fff; overflow: visible; border-top: 1px solid #000; }
.insights-overview .insights-overview-card__header { padding: 1.25rem 0; min-height: 6.25rem; }
.insights-overview .insights-overview-card strong { font-size: clamp(1.65rem, 2.2vw, 2.35rem); max-width: none; line-height: 1.1; }
.insights-overview .insights-overview-card__image { flex: none; aspect-ratio: 16 / 10; background: #f2f2f0; }
.insights-overview .insights-overview-card__image img { object-fit: contain; object-position: center; filter: none; transform: none; }
.insights-overview .insights-overview-card__empty { display: none; }
.insights-overview-card .mind-action { margin-top: auto; padding-block: 1rem; }
.insights-overview-card a:hover strong, .insights-overview-card a:focus-visible strong { text-decoration: underline; text-decoration-color: var(--ui-lime); text-underline-offset: .12em; }

/* Article rhythm: a readable lead rail and a larger content rail. Wide images
   use that full rail; portrait originals keep their ratio and align left. */
.legacy-page-root .main-wrapper > header { padding-top: var(--ui-header-height); }
.legacy-page-root .heading-style-insight_study.is-header { max-width: var(--block-heading-width, none); font-size: var(--block-heading-size, clamp(2.6rem, 6vw, 6.8rem)); line-height: 1.08; }
.legacy-page-root .insight_grid-header, .legacy-page-root .insight_grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.legacy-page-root .insight_grid-header > *, .legacy-page-root .insight_grid > * { min-width: 0; }
.legacy-page-root .insight_grid .max-width-small, .legacy-page-root .insight_grid .max-width-xsmall { max-width: none; }
.legacy-page-root .text-rich-text p { line-height: 1.55; }
.legacy-page-root .text-rich-text figure.w-richtext-figure-type-image,
.legacy-page-root figure.w-richtext-figure-type-image {
  display: block;
  float: none;
  width: 100%;
  max-width: 100%;
  margin: 2rem 0;
  text-align: left;
}
.legacy-page-root figure.w-richtext-figure-type-image > div { display: block; width: 100%; max-width: none; }
.legacy-page-root figure.w-richtext-figure-type-image img { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; }
.legacy-page-root figure.w-richtext-figure-type-image:has(img[data-portrait]) { max-width: 34rem; }
.mind-content .mind-block__media, .mind-content .mind-gallery img { height: auto; max-height: none; object-fit: contain; }

/* Stable numeric geometry. Only an absolutely positioned ink layer changes. */
.legacy-page-root .insight_stats { grid-template-rows: none; gap: 2.5rem 2rem; }
.legacy-page-root .insight_stat { min-width: 0; gap: 1rem; }
.legacy-page-root .insight_stat > .relative { max-width: 100%; width: fit-content; isolation: isolate; }
.legacy-page-root .text-style-stat { font-size: clamp(2.8rem, 6vw, 7rem); line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.legacy-page-root .text-style-stat.smaller { font-size: clamp(2rem, 3vw, 3rem); }
.stat-reserve { visibility: hidden; }
.stat-live { position: absolute; inset: 0; text-align: left; }
.legacy-page-root .insight_highlight, .legacy-page-root .insight_highlight-2 {
  inset: 32% -.04em 5%;
  width: auto; height: auto;
  background: var(--ui-lime); z-index: 0; transform: rotate(-.7deg);
  mask: url('/assets/brand/hivemind/markers/headline-highlight.webp') center / 100% 100% no-repeat;
  -webkit-mask: url('/assets/brand/hivemind/markers/headline-highlight.webp') center / 100% 100% no-repeat;
}
.mind-kpi .mind-kpi__value { position: relative; isolation: isolate; width: fit-content; font-variant-numeric: tabular-nums; }
.mind-kpi__value::after { content: ''; position: absolute; z-index: -1; inset: 35% -.03em 5%; background: var(--ui-lime); mask: url('/assets/brand/hivemind/markers/headline-highlight.webp') center / 100% 100% no-repeat; }

/* Public actions share type size, arrow travel, focus and target height. */
.mind-action, .legacy-page-root .link-icon.is-regular, .legacy-page-root .link-icon.is-insight,
.mind-content .mind-cta {
  display: inline-flex; align-items: center; gap: .65rem; min-height: 44px;
  font-family: var(--mind-font, "CHMedia"), sans-serif; font-size: 1rem; font-weight: 400; line-height: 1.3;
}
.mind-action > span, .legacy-page-root .link-icon .icon-embed-arrow, .mind-cta > i {
  transition: transform var(--ui-duration) var(--ui-ease);
}
.legacy-page-root .link-icon .icon-embed-arrow { width: .7rem; height: 1.2rem; }
a:hover > .mind-action > span, a:focus-visible > .mind-action > span,
.legacy-page-root .link-icon:hover .icon-embed-arrow, .legacy-page-root .link-icon:focus-visible .icon-embed-arrow,
.mind-cta:hover > i, .mind-cta:focus-visible > i { transform: translateX(.3rem); }
.legacy-page-root .link-icon:hover, .legacy-page-root .link-icon:focus-visible { text-decoration: underline; text-decoration-color: var(--ui-lime); text-underline-offset: .3em; }
.legacy-page-root .more-insights { gap: 2rem; }
.legacy-page-root .insight { min-width: 0; }
.legacy-page-root .more-insights .heading-style-insight_study.is-tiny { font-size: clamp(1.8rem, 2.7vw, 3rem); line-height: 1.1; }
.legacy-page-root a:focus-visible, .mind-content a:focus-visible, .insights-overview a:focus-visible,
.nav a:focus-visible, .nav button:focus-visible, .mind-site-header a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.mind-related a:hover strong, .mind-related a:focus-visible strong { color: var(--ui-lime); }
/* Outline lettering never fills on interaction. Reuse the existing CTA feedback
   when its sibling title link is hovered or receives keyboard focus. */
.legacy-page-root .more-insights .insight:has(a:hover, a:focus-visible) .link-icon {
  text-decoration: underline; text-decoration-color: var(--ui-lime); text-underline-offset: .3em;
}
.legacy-page-root .more-insights .insight:has(a:hover, a:focus-visible) .icon-embed-arrow {
  transform: translateX(.3rem);
}

@media (max-width: 991px) {
  .insights-overview .insights-overview__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insights-overview .insights-overview__intro { grid-template-columns: 1fr; gap: 1.5rem; }
  .insights-overview .insights-overview__intro h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); }
  .legacy-page-root .insight_grid-header, .legacy-page-root .insight_grid { grid-template-columns: 1fr; gap: 2rem; }
  .legacy-page-root .text-style-stat { font-size: clamp(2.5rem, 9vw, 6rem); }
  .mind-site-header.mind-site-header .mind-site-header__logo { width: 9rem; }
}
@media (max-width: 600px) {
  .insights-overview .insights-overview__grid { grid-template-columns: 1fr; }
  .insights-overview .insights-overview-card__header { min-height: 0; }
  .legacy-page-root .insight_stats { gap: 2rem 1rem; }
  .legacy-page-root .text-style-stat { font-size: clamp(2rem, 8vw, 3rem); }
}
@media (prefers-reduced-motion: reduce) {
  .nav.nav, .mind-action > span, .legacy-page-root .link-icon .icon-embed-arrow,
  .mind-site-header__nav-marker, .insights-overview-card *, .nav__link::before,
  .nav-link.w-nav-link::before, .mind-cta > i { transition: none !important; }
}

/* One header height across the three shells. */
.navbar.navbar, .navbar .container-navbar.w-container, .navbar .navbar-flex { min-height: var(--ui-header-height); }
.legacy-page-root .main-wrapper > header .padding-section-large { padding-top: clamp(3rem, 5vw, 5rem); }
.legacy-page-root .insight_grid .text-rich-text:has(> figure) { max-width: none; }

/* This inspected photograph has its subject in the upper third. Other artwork
   keeps the entire original until an editor has chosen a specific crop. */
.insights-overview .insights-overview-card__image[data-framing="portrait-top"] img { object-fit: cover; object-position: 50% 0%; }

.best-cases__link.best-cases__link, .chladni__link.chladni__link {
  font-size: 1rem; min-height: 44px; gap: .65rem; font-weight: 400;
}
.best-cases__link .arrow, .chladni__link .arrow { width: .7rem; height: 1.2rem; transition: transform var(--ui-duration) var(--ui-ease); }
.best-cases__link:hover .arrow, .best-cases__link:focus-visible .arrow,
.chladni__link:hover .arrow, .chladni__link:focus-visible .arrow { transform: translateX(.3rem); }
.legacy-page-root .text-rich-text p { font-size: 1rem; }
@media (prefers-reduced-motion: reduce) {
  .best-cases__link .arrow, .chladni__link .arrow { transition: none; }
}
@media (max-width: 600px) {
  .legacy-page-root .heading-style-insight_study.is-header { font-size: clamp(1.75rem, 7.5vw, 2.6rem); hyphens: auto; }
}

.legacy-page-root .more-insights_desktop-btn { width: auto; height: auto; gap: .65rem; font-size: 1rem; white-space: nowrap; }
.more-insights_desktop-btn .icon-embed-custom-6 { width: .7rem; height: 1.2rem; transition: transform var(--ui-duration) var(--ui-ease); }
.more-insights_desktop-btn:hover .icon-embed-custom-6, .more-insights_desktop-btn:focus-visible .icon-embed-custom-6 { transform: translateX(.3rem); }
@media (prefers-reduced-motion: reduce) { .more-insights_desktop-btn .icon-embed-custom-6 { transition: none; } }

/* Inline size marks set by the CMS format bar. */
[data-size="s"] { font-size: .8em; }
[data-size="m"] { font-size: 1em; }
[data-size="l"] { font-size: 1.3em; }
