/* ─── Claritas shared site styles ──────────────────────────
   Tokens, nav, pills, eyebrow, engage block, footer — shared
   across every page except the homepage (which stays inline).
   ─────────────────────────────────────────────────────────── */

:root {
  --bg: #FAFAF7;
  --ink: #0a0a0a;
  --ink-2: #2c2c2c;
  --ink-soft: #5b5b5b;
  --muted: #8a8a8a;
  --line: #e8e6df;

  --purple: #654288;
  --purple-deep: #4a2f66;
  --purple-soft: #f1ecf6;
  --magenta: #c64c8c;
  --orange: #FFAC25;
  --orange-soft: #ffe9c2;
  --cream: #FAEDBC;

  --shadow-card: 0 1px 2px rgba(10,10,10,0.04), 0 12px 32px -12px rgba(10,10,10,0.08);

  /* Motion. Strong curves; CSS keywords lack punch. Durations stay under 300ms for UI. */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-card:   cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-press:   140ms;
  --dur-fast:    180ms;
  --dur-medium:  240ms;
  --dur-image:   600ms;
}
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1480px; margin: 0 auto; padding: 0 48px; }
.wrap.wide { max-width: 1680px; }
.wrap.narrow { max-width: 980px; }
.wrap.text { max-width: 760px; }

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--purple); margin-bottom: 20px;
  text-transform: none;
}
.eyebrow.cap {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft);
}

/* ───── nav ───── */
nav.top {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250,250,247,0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(232,230,223,0.6);
}
nav.top .inner {
  display: flex; align-items: center; gap: 40px; height: 64px;
}
.logo {
  display: inline-flex; align-items: center;
  line-height: 1;
  flex-shrink: 0;
}
.logo img {
  display: block;
  height: clamp(28px, 4.2vw, 38px);
  width: auto;
  max-width: none;
  flex-shrink: 0;
}
.foot-logo img { height: 56px; max-width: none; }
nav.top ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 28px; flex: 1;
}
nav.top a.link {
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  padding: 6px 0; position: relative;
  transition: color var(--dur-fast) ease;
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
nav.top a.link.is-active { color: var(--purple); }
@media (hover: hover) and (pointer: fine) {
  nav.top a.link:hover { color: var(--purple); }
}
nav.top a.link.is-active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--purple);
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  transition:
    background var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease,
    transform var(--dur-press) var(--ease-out),
    filter var(--dur-fast) ease;
  white-space: nowrap;
}
.pill:active { transform: scale(0.97); }
.pill.is-busy {
  filter: blur(2px) saturate(0.8);
  pointer-events: none;
  cursor: progress;
}
.pill.ghost { color: var(--ink-2); }
.pill.solid { background: var(--ink); color: var(--bg); }
.pill.solid .arr {
  transition: transform var(--dur-fast) var(--ease-out);
  display: inline-block;
}
.pill.purple { background: var(--purple); color: white; }
.pill.outline {
  background: white; color: var(--ink);
  box-shadow: 0 0 0 1px var(--line) inset, 0 1px 2px rgba(0,0,0,0.02);
}
@media (hover: hover) and (pointer: fine) {
  .pill.ghost:hover { background: rgba(0,0,0,0.04); }
  .pill.solid:hover { background: var(--purple); }
  .pill.solid:hover .arr { transform: translateX(3px); }
  .pill.purple:hover { background: var(--purple-deep); }
  .pill.outline:hover { box-shadow: 0 0 0 1px var(--ink) inset; }
}

.nav-contact {
  display: inline-flex; align-items: center; gap: 18px;
  padding-left: 18px; margin-left: 6px;
  border-left: 1px solid var(--line);
}
.nav-contact a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-2); font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: color var(--dur-fast) ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav-contact a:hover { color: var(--purple); }
}
.nav-contact svg {
  width: 14px; height: 14px;
  color: var(--purple);
  flex-shrink: 0;
}
@media (max-width: 1100px) { .nav-contact { display: none; } }
@media (max-width: 1200px) {
  nav.top .inner { gap: 24px; }
  nav.top ul { gap: 18px; }
  nav.top a.link { font-size: 13px; }
}

/* ───── section heads (consistent) ───── */
.head-2col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  margin-bottom: 56px; align-items: end; max-width: 1100px;
}
.head-2col h2 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(20px, 1.7vw, 26px); line-height: 1.15;
  letter-spacing: -0.015em; font-weight: 600;
  margin: 0; max-width: 30ch;
}
.head-2col p {
  font-size: 17px; line-height: 1.55;
  color: var(--ink-soft); margin: 0; max-width: 46ch;
}
@media (max-width: 880px) {
  .head-2col { grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; }
  section.page-hero { padding: 56px 0 48px; }
}

/* ───── engage block ───── */
section.engage {
  padding: 120px 0 110px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: relative; overflow: hidden;
}
section.engage::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 100% 0%, rgba(101,66,136,0.10), transparent 60%),
    radial-gradient(50% 40% at 0% 100%, rgba(255,172,37,0.18), transparent 55%);
  pointer-events: none;
}
.engage-grid {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 80px; align-items: end;
  position: relative; z-index: 1;
}
.engage-eyebrow {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--purple);
  margin-bottom: 20px;
}
.engage h2 {
  font-family: "Newsreader", "Times New Roman", serif;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.0; letter-spacing: -0.03em;
  font-weight: 500; margin: 0 0 20px;
  max-width: 18ch; color: var(--ink);
}
.engage h2 em {
  font-style: italic; color: var(--purple);
  font-weight: 500;
}
.engage > .wrap > .engage-grid > div > p {
  font-size: 18px; line-height: 1.55;
  color: var(--ink-2); margin: 0 0 28px;
  max-width: 52ch;
}
.engage-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.engage-ctas .pill { padding: 14px 22px; font-size: 15px; }
.engage-aside {
  font-family: "Newsreader", "Times New Roman", serif;
  font-style: italic; font-size: 19px;
  line-height: 1.45; color: var(--ink-2);
  padding-left: 22px;
  border-left: 1px solid var(--ink);
  max-width: 30ch;
  margin: 0;
}
.engage-aside-sig {
  display: block; margin-top: 14px;
  font-style: normal; font-family: "Inter", sans-serif;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
}
@media (max-width: 880px) {
  section.engage { padding: 64px 0 56px; }
  .engage-grid { grid-template-columns: 1fr; gap: 36px; }
  .engage-aside { padding-left: 18px; font-size: 17px; }
}

/* ───── site footer ───── */
footer.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.72);
  padding: 72px 0 28px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.foot-brand { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.foot-tag {
  font-size: 14px; line-height: 1.55;
  color: rgba(255,255,255,0.62);
  max-width: 32ch; margin: 4px 0 10px;
}
.foot-creds {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.foot-cred {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}
.foot-cred::before {
  content: ""; width: 5px; height: 5px;
  background: var(--orange); border-radius: 50%;
  flex-shrink: 0;
}
.foot-col h4 {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin: 0 0 18px;
}
.foot-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.foot-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  transition: color var(--dur-fast) ease;
}
.foot-contact a {
  display: block; font-size: 13.5px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 8px;
  transition: color var(--dur-fast) ease;
}
@media (hover: hover) and (pointer: fine) {
  .foot-col a:hover,
  .foot-contact a:hover,
  .foot-legal a:hover { color: var(--orange); }
}
.foot-address {
  font-size: 12.5px; line-height: 1.55;
  color: rgba(255,255,255,0.55);
  margin-top: 14px;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  padding-top: 24px;
  font-size: 12px; color: rgba(255,255,255,0.5);
}
.foot-legal { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-copyright {
  font-size: 11.5px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.01em;
}
.foot-social { display: flex; gap: 10px; }
.foot-social a {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%;
  color: rgba(255,255,255,0.6);
  transition:
    background var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    transform var(--dur-press) var(--ease-out);
}
.foot-social a:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .foot-social a:hover {
    color: var(--ink);
    background: var(--orange);
    border-color: var(--orange);
  }
}
.foot-social svg { width: 14px; height: 14px; }
@media (max-width: 1100px) {
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  footer.site-footer { padding: 56px 0 24px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px 28px; padding-bottom: 36px; }
  .footer-bottom { font-size: 11px; gap: 14px; }
  .foot-copyright { width: 100%; order: 3; }
}

/* ───── responsive nav ───── */
@media (max-width: 880px) {
  nav.top ul { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  nav.top .inner { gap: 10px; height: 60px; }
  nav.top .pill.ghost { display: none; }
  nav.top .pill.solid {
    padding: 9px 14px; font-size: 13px;
    white-space: nowrap;
  }
  .foot-logo img { height: 48px; }
}

/* ───── Article reading layout (shared across insight-*.html pages) ───── */
article.read {
  padding: 100px 0 110px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 88px;
  background: var(--bg);
}
.read-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 28px;
  transition: gap var(--dur-fast) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .read-back:hover { gap: 14px; }
}
.read-meta {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.read-meta .sep { color: var(--ink-soft); opacity: 0.5; font-weight: 400; }
.read-title {
  font-family: "Newsreader", "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.05; letter-spacing: -0.025em;
  font-weight: 500; color: var(--ink);
  margin: 0 0 28px;
  max-width: 22ch;
}
.read-title em { font-style: italic; color: var(--purple); }
.read-deck {
  font-size: 20px; line-height: 1.45;
  color: var(--ink-2);
  font-weight: 400; letter-spacing: -0.005em;
  margin: 0 0 56px;
  max-width: 60ch;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--ink);
}
.read-body {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 56px;
}
.read-aside {
  position: sticky; top: 96px;
  align-self: start;
}
.read-aside .label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.read-aside .author {
  font-size: 14px; font-weight: 600;
  color: var(--ink); margin-bottom: 4px;
}
.read-aside .role {
  font-size: 12px; color: var(--ink-soft);
  margin-bottom: 18px;
}
.read-aside .read-time {
  font-size: 12px; color: var(--ink-soft);
  padding-top: 12px; border-top: 1px solid var(--line);
}
.read-prose {
  font-family: "Newsreader", "Times New Roman", Georgia, serif;
  font-size: 19px; line-height: 1.65;
  color: var(--ink-2);
  max-width: 64ch;
}
.read-prose h3 {
  font-family: "Newsreader", serif;
  font-size: 26px; font-weight: 500;
  line-height: 1.15; letter-spacing: -0.015em;
  color: var(--ink);
  margin: 48px 0 16px;
}
.read-prose p { margin: 0 0 22px; }
.read-prose p em { font-style: italic; color: var(--purple); }
.read-prose .pull {
  font-size: 26px; line-height: 1.25;
  font-weight: 400; color: var(--ink);
  font-style: italic;
  border-left: 2px solid var(--purple);
  padding: 14px 0 14px 28px;
  margin: 36px 0 36px;
}
.read-prose .takeaway {
  background: var(--cream);
  padding: 28px 32px;
  margin: 36px 0;
  font-family: "Inter", sans-serif;
  font-size: 15px; line-height: 1.6;
  color: var(--ink); font-style: normal;
}
.read-prose .takeaway-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--purple); margin-bottom: 10px;
  display: block;
}
.read-prose .takeaway ul { margin: 0; padding-left: 18px; }
.read-prose .takeaway li { margin-bottom: 6px; }

/* Related articles strip at bottom of each article */
.read-related {
  padding: 80px 0 100px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.read-related .label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 28px;
}
.related-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.related-card {
  display: flex; flex-direction: column;
  padding: 28px 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  text-decoration: none;
  transition:
    transform var(--dur-medium) var(--ease-card),
    border-color var(--dur-fast) ease,
    box-shadow var(--dur-medium) ease;
}
.related-card:active { transform: translateY(-1px) scale(0.99); }
@media (hover: hover) and (pointer: fine) {
  .related-card:hover {
    transform: translateY(-2px);
    border-color: var(--ink);
    box-shadow: var(--shadow-card);
  }
}
.related-card .cat {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.related-card .ttl {
  font-family: "Newsreader", serif;
  font-size: 22px; font-weight: 500;
  line-height: 1.2; color: var(--ink);
  margin: 0 0 8px;
}
.related-card .meta {
  font-size: 12px; color: var(--ink-soft);
  margin-top: auto; padding-top: 16px;
}

@media (max-width: 880px) {
  article.read { padding: 56px 0 72px; }
  .read-body { grid-template-columns: 1fr; gap: 24px; }
  .read-aside { position: static; }
  .read-prose { font-size: 17px; }
  .read-prose h3 { font-size: 22px; }
  .related-grid { grid-template-columns: 1fr; }
}

/* ── Stripe-style logo marquee (global because logos are injected by JS) ── */
.marquee {
  overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: inline-flex; gap: 64px; align-items: center;
  width: max-content; padding: 4px 0;
  animation: marquee-scroll 55s linear infinite;
}
@media (hover: hover) and (pointer: fine) {
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.cl {
  flex-shrink: 0; height: 40px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; letter-spacing: -0.02em;
  line-height: 1;
  opacity: 0.95;
  transition:
    opacity var(--dur-medium) ease,
    transform var(--dur-medium) var(--ease-card);
  cursor: default;
  white-space: nowrap;
  font-family: "Inter", sans-serif;
}
.cl small { font-size: 11px; font-weight: 500; opacity: 0.7; margin-left: 4px; letter-spacing: 0; }
.cl em { font-style: normal; }
.cl img {
  height: 32px; width: auto; max-width: 140px;
  object-fit: contain;
  filter: saturate(0.85) contrast(0.95);
  transition:
    filter var(--dur-medium) ease,
    transform var(--dur-medium) var(--ease-card);
}
@media (hover: hover) and (pointer: fine) {
  .cl:hover { opacity: 1; transform: translateY(-1px); }
  .cl:hover img { filter: saturate(1) contrast(1); }
}
@media (max-width: 640px) {
  .marquee-track { gap: 40px; }
  .cl { height: 32px; font-size: 15px; }
  .cl img { height: 24px; max-width: 110px; }
}

/* ─── Loaders ────────────────────────────────────────────────
   Three reusable loaders. Picked from /loaders.html.
   - .ld-arc      → inline arc spinner (currentColor-aware)
   - .ld-orbit    → centerpiece orbit dots (3 concentric rings)
   - .ld-skel-*   → article-card skeleton grid

   .pill.is-busy now uses .ld-arc via ::after so every busy
   submit button gets the spinner with no JS markup work. The
   button's own text is blurred + transparent so the arc reads
   as the focal point.
*/

/* Inline arc spinner */
.ld-arc {
  display: inline-block;
  width: 14px; height: 14px; border-radius: 999px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  opacity: 0.85;
  animation: ld-arc-spin 720ms linear infinite;
  vertical-align: middle;
}
@keyframes ld-arc-spin { to { transform: rotate(360deg); } }

/* Busy-button pattern: blur the label, overlay a centered arc. */
.pill.is-busy {
  position: relative;
  pointer-events: none;
  cursor: progress;
  color: transparent !important;     /* hide the text without affecting layout */
  filter: saturate(0.85);
}
.pill.is-busy::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.85);
  border-top-color: transparent;
  animation: ld-arc-spin 720ms linear infinite;
}
.pill.is-busy.outline::after,
.pill.is-busy.ghost::after {
  border-color: rgba(101,66,136,0.45);
  border-top-color: transparent;
}

/* Orbit centerpiece: three concentric rings, opposing tempos. */
.ld-orbit-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 14px;
  padding: 40px 0;
  color: var(--ink-soft);
}
.ld-orbit-wrap .caption {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft);
}
.ld-orbit {
  position: relative;
  width: 56px; height: 56px;
}
.ld-orbit::before {
  content: ""; position: absolute; inset: 50% 50% 50% 50%;
  width: 5px; height: 5px; margin: -2.5px;
  background: var(--ink); border-radius: 999px;
}
.ld-orbit .ring {
  position: absolute; inset: 0;
  animation: ld-orbit-spin 1.6s linear infinite;
}
.ld-orbit .ring::after {
  content: ""; position: absolute; top: 0; left: 50%;
  width: 6px; height: 6px; margin-left: -3px;
  background: var(--purple); border-radius: 999px;
}
.ld-orbit .ring.r2 {
  inset: 10px; animation-duration: 2.4s; animation-direction: reverse;
}
.ld-orbit .ring.r2::after {
  width: 4px; height: 4px; margin-left: -2px;
  background: var(--orange);
}
.ld-orbit .ring.r3 {
  inset: 20px; animation-duration: 3.2s;
}
.ld-orbit .ring.r3::after {
  width: 3px; height: 3px; margin-left: -1.5px;
  background: var(--ink); opacity: 0.5;
}
@keyframes ld-orbit-spin { to { transform: rotate(360deg); } }

/* Article-card skeleton grid: matches .idx-card height so layout
   doesn't shift on hydration. Cascading purple→amber shimmer. */
.ld-skel-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, 1fr);
  grid-column: 1 / -1;
}
@media (max-width: 880px) { .ld-skel-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .ld-skel-grid { grid-template-columns: 1fr; } }
.ld-skel {
  background: white;
  border: 1px solid var(--line);
  height: 360px;
  display: flex; flex-direction: column;
  overflow: hidden; position: relative;
}
.ld-skel .img,
.ld-skel .ln {
  background: linear-gradient(
    90deg,
    rgba(101,66,136,0.05) 0%,
    rgba(101,66,136,0.10) 40%,
    rgba(255,172,37,0.08) 50%,
    rgba(101,66,136,0.10) 60%,
    rgba(101,66,136,0.05) 100%
  );
  background-size: 200% 100%;
  animation: ld-shimmer 1.8s linear infinite;
}
.ld-skel .img { height: 60%; }
.ld-skel .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ld-skel .ln { height: 9px; border-radius: 2px; }
.ld-skel .ln.l1 { width: 88%; }
.ld-skel .ln.l2 { width: 62%; }
.ld-skel:nth-child(2) .img, .ld-skel:nth-child(2) .ln { animation-delay: 120ms; }
.ld-skel:nth-child(3) .img, .ld-skel:nth-child(3) .ln { animation-delay: 240ms; }
.ld-skel:nth-child(4) .img, .ld-skel:nth-child(4) .ln { animation-delay: 360ms; }
@keyframes ld-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Reduced-motion fallbacks for the loaders. */
@media (prefers-reduced-motion: reduce) {
  .ld-arc,
  .pill.is-busy::after,
  .ld-orbit .ring,
  .ld-skel .img,
  .ld-skel .ln { animation: none !important; }
  .ld-orbit-wrap .caption::after { content: " · loading"; }
}

/* ─── Shared motion helpers ─── */
.stagger-item {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--dur-medium) var(--ease-out),
    transform var(--dur-medium) var(--ease-out);
  will-change: opacity, transform;
}
.stagger-item.is-in-view {
  opacity: 1;
  transform: none;
}

.form-status {
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.form-status:not([hidden]) {
  opacity: 1;
  transform: none;
}

/* Tab content cross-fade. Pages that use [data-panel] inherit this. */
[data-panel] { display: none; }
[data-panel].is-active {
  display: block;
  animation: tab-fade var(--dur-medium) var(--ease-out);
}
@keyframes tab-fade {
  from { opacity: 0; transform: translateY(4px) scale(0.995); }
  to   { opacity: 1; transform: none; }
}

/* Brief outline flash when an in-page anchor (e.g. event-card click → register form) lands. */
.is-target {
  animation: target-flash 1.2s var(--ease-out);
}
@keyframes target-flash {
  0%   { box-shadow: 0 0 0 0 rgba(101, 66, 136, 0); }
  20%  { box-shadow: 0 0 0 4px rgba(101, 66, 136, 0.20); }
  100% { box-shadow: 0 0 0 0 rgba(101, 66, 136, 0); }
}

/* ─── Reduced motion: keep cues, drop motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee-track { animation: none !important; }
  .stagger-item { opacity: 1; transform: none; }
  .pill:active,
  .related-card:active,
  .foot-social a:active { transform: none; }
}

/* ─── Page transitions: native cross-document View Transitions (no white flash) ─── */
@view-transition { navigation: auto; }

/* Persistent header: the top nav is promoted to its own transition group, so it
   stays steady in place while the content slides beneath it (its active-link
   state cross-fades smoothly between pages). */
nav.top { view-transition-name: site-nav; }

/* Directional slide with depth. The incoming page slides fully in on top; the
   outgoing recedes 28% and dims. Direction (`data-dir`) is set per-navigation by
   the inline script in <head>, spatially matched to the nav:
     right / left → lateral nav (matches nav-bar order)
     in / out     → drilling into / back out of content (vertical)
   No-dir fallback is a forward (rightward) slide. */
:root { --vt-ease: cubic-bezier(0.4, 0, 0.12, 1); --vt-dur: 0.46s; }

html[data-dir="right"]::view-transition-new(root),
html:not([data-dir])::view-transition-new(root) { animation: clInR var(--vt-dur) var(--vt-ease) both; }
html[data-dir="right"]::view-transition-old(root),
html:not([data-dir])::view-transition-old(root) { animation: clOutL var(--vt-dur) var(--vt-ease) both; }
html[data-dir="left"]::view-transition-new(root) { animation: clInL var(--vt-dur) var(--vt-ease) both; }
html[data-dir="left"]::view-transition-old(root) { animation: clOutR var(--vt-dur) var(--vt-ease) both; }
html[data-dir="in"]::view-transition-new(root)   { animation: clInUp var(--vt-dur) var(--vt-ease) both; }
html[data-dir="in"]::view-transition-old(root)   { animation: clOutUp var(--vt-dur) var(--vt-ease) both; }
html[data-dir="out"]::view-transition-new(root)  { animation: clInDown var(--vt-dur) var(--vt-ease) both; }
html[data-dir="out"]::view-transition-old(root)  { animation: clOutDown var(--vt-dur) var(--vt-ease) both; }

/* Horizontal (lateral nav) */
@keyframes clInR { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes clOutL { from { transform: translateX(0); filter: brightness(1); } to { transform: translateX(-28%); filter: brightness(0.86); } }
@keyframes clInL { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes clOutR { from { transform: translateX(0); filter: brightness(1); } to { transform: translateX(28%); filter: brightness(0.86); } }
/* Vertical (content depth) */
@keyframes clInUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes clOutUp { from { transform: translateY(0); filter: brightness(1); } to { transform: translateY(-28%); filter: brightness(0.86); } }
@keyframes clInDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes clOutDown { from { transform: translateY(0); filter: brightness(1); } to { transform: translateY(28%); filter: brightness(0.86); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ─── Loading feedback: top progress bar (delayed) + clicked-link state ─── */
#page-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--purple, #654288), var(--orange, #FFAC25));
  box-shadow: 0 0 10px rgba(101, 66, 136, 0.45);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  /* Indeterminate fill; visibility delayed 150ms so instant loads don't flicker it. */
  #page-progress.go {
    animation:
      ppGrow 2.4s cubic-bezier(0.1, 0.6, 0.2, 1) forwards,
      ppShow 0.01s linear 0.15s forwards;
  }
  @keyframes ppGrow { 0% { width: 0; } 55% { width: 72%; } 100% { width: 92%; } }
  @keyframes ppShow { to { opacity: 1; } }
}
/* Instant press feedback on any tappable link so the click registers visibly. */
a.link:active,
a.pill:active,
a.btn:active { opacity: 0.6; }
a.is-navigating { opacity: 0.6; }
