/* rc166 — Premium Heading System */
:root{
  --heading-ink:#111827;
  --heading-muted:#64748b;
  --heading-line:#d6deea;
  --heading-accent:#5b5bd6;
  --heading-accent-2:#2477c8;
  --heading-accent-3:#168579;
  --heading-accent-4:#8253b5;
  --heading-accent-5:#b8791e;
}

body :where(h1,h2,h3,h4,h5,h6){
  color:var(--heading-ink)!important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;
  text-rendering:optimizeLegibility;
}

/* Page titles */
body .uix-page-heading{
  position:relative;
  margin:0 0 .6rem;
  font-size:clamp(2rem,3.2vw,3.15rem)!important;
  line-height:1.04!important;
  font-weight:900!important;
  letter-spacing:-.045em!important;
  color:#101828!important;
  max-width:18ch;
}
body .uix-page-heading::after{
  content:"";
  display:block;
  width:72px;
  height:5px;
  margin-top:14px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--uix-heading-accent,#5b5bd6),color-mix(in srgb,var(--uix-heading-accent,#5b5bd6) 46%,#fff));
  box-shadow:0 5px 14px color-mix(in srgb,var(--uix-heading-accent,#5b5bd6) 20%,transparent);
}

/* Section titles */
body .uix-section-heading{
  position:relative;
  padding-left:16px;
  font-size:clamp(1.35rem,2vw,1.72rem)!important;
  line-height:1.15!important;
  font-weight:850!important;
  letter-spacing:-.028em!important;
  color:#182230!important;
}
body .uix-section-heading::before{
  content:"";
  position:absolute;
  left:0;
  top:.08em;
  bottom:.08em;
  width:5px;
  border-radius:999px;
  background:var(--uix-heading-accent,#5b5bd6);
  box-shadow:0 0 0 4px color-mix(in srgb,var(--uix-heading-accent,#5b5bd6) 10%,transparent);
}

/* Card and widget titles */
body .uix-card-heading{
  font-size:1.03rem!important;
  line-height:1.25!important;
  font-weight:800!important;
  letter-spacing:-.018em!important;
  color:#253248!important;
}
body .uix-card-heading::after{
  content:"";
  display:block;
  width:32px;
  height:3px;
  margin-top:8px;
  border-radius:999px;
  background:var(--uix-heading-accent,#64748b);
  opacity:.85;
}

/* Chart/table headings */
body .uix-data-heading{
  display:flex;
  align-items:center;
  gap:9px;
  font-size:1.08rem!important;
  font-weight:850!important;
  letter-spacing:-.02em!important;
  color:#26344a!important;
}
body .uix-data-heading::before{
  content:"";
  width:10px;
  height:10px;
  flex:0 0 10px;
  border-radius:3px;
  background:var(--uix-heading-accent,#5b5bd6);
  box-shadow:0 0 0 4px color-mix(in srgb,var(--uix-heading-accent,#5b5bd6) 11%,transparent);
}

/* Eyebrows/kickers above headings */
body :where(.eyebrow,.kicker,[class*="-heading"] > span:first-child,.uix-heading-eyebrow){
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-bottom:7px;
  color:var(--uix-heading-accent,#5b5bd6)!important;
  font-size:.74rem!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:.095em!important;
  text-transform:uppercase;
}
body :where(.eyebrow,.kicker,[class*="-heading"] > span:first-child,.uix-heading-eyebrow)::before{
  content:"";
  width:18px;
  height:3px;
  border-radius:999px;
  background:currentColor;
  opacity:.72;
}

/* Hero headings */
body :where([class*="-hero"],.page-hero,.hero) .uix-page-heading,
body :where([class*="-hero"],.page-hero,.hero) h1{
  color:#fff!important;
  text-shadow:0 2px 18px rgba(0,0,0,.12);
  max-width:20ch;
}
body :where([class*="-hero"],.page-hero,.hero) .uix-page-heading::after{
  background:linear-gradient(90deg,#fff,rgba(255,255,255,.35));
  box-shadow:none;
}
body :where([class*="-hero"],.page-hero,.hero) :where(.eyebrow,.kicker,[class*="-heading"] > span:first-child){
  color:rgba(255,255,255,.78)!important;
}

/* Accent families */
.uix-heading-tone-1{--uix-heading-accent:#5b5bd6}
.uix-heading-tone-2{--uix-heading-accent:#2477c8}
.uix-heading-tone-3{--uix-heading-accent:#168579}
.uix-heading-tone-4{--uix-heading-accent:#8253b5}
.uix-heading-tone-5{--uix-heading-accent:#b8791e}
.uix-heading-tone-6{--uix-heading-accent:#b84d69}
.uix-heading-tone-7{--uix-heading-accent:#25895e}
.uix-heading-tone-8{--uix-heading-accent:#3d647e}

/* Premium heading motion */
@keyframes uix-heading-in{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}
.uix-heading-reveal{
  opacity:0;
  animation:uix-heading-in .42s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay:var(--uix-heading-delay,0ms);
}

/* Better spacing around titled sections */
body :where(.uix-page-heading + p,.uix-section-heading + p,.uix-card-heading + p){
  margin-top:.45rem!important;
}
body :where(.uix-section-heading,.uix-data-heading){margin-bottom:.72rem!important}

/* Dark mode */
body.theme-dark .uix-page-heading,
html[data-theme="dark"] body .uix-page-heading,
body.theme-dark .uix-section-heading,
html[data-theme="dark"] body .uix-section-heading,
body.theme-dark .uix-card-heading,
html[data-theme="dark"] body .uix-card-heading,
body.theme-dark .uix-data-heading,
html[data-theme="dark"] body .uix-data-heading{
  color:#f3f6fb!important;
}
body.theme-dark :where(.eyebrow,.kicker,[class*="-heading"] > span:first-child,.uix-heading-eyebrow),
html[data-theme="dark"] body :where(.eyebrow,.kicker,[class*="-heading"] > span:first-child,.uix-heading-eyebrow){
  color:#aeb7ff!important;
}

@media(max-width:760px){
  body .uix-page-heading{font-size:clamp(1.72rem,8vw,2.25rem)!important;max-width:none}
  body .uix-page-heading::after{width:54px;height:4px;margin-top:10px}
  body .uix-section-heading{font-size:1.28rem!important}
}
@media(prefers-reduced-motion:reduce){
  .uix-heading-reveal{opacity:1!important;animation:none!important}
}
