:root.rc-theme-light {
  color-scheme: light;
  --rc-background: #f5f1e9;
  --rc-surface: #fffdf8;
  --rc-surface-soft: #e8e1d6;
  --rc-text: #171614;
  --rc-muted: #68635b;
  --rc-border: #cec6ba;
  --rc-accent: #d59b80;
  --rc-link: #171614;
  --rc-focus: #a84831;
  /* Compatibility tokens used by the imported WordPress Global CSS. */
  --rc-bg: var(--rc-background);
  --rc-bg-soft: var(--rc-surface-soft);
  --rc-faint: color-mix(in srgb, var(--rc-text) 42%, transparent);
  --rc-line: var(--rc-border);
}

:root.rc-theme-dark {
  color-scheme: dark;
  --rc-background: #0e0e0e;
  --rc-surface: #161515;
  --rc-surface-soft: #2e2e2e;
  --rc-text: #f2f2f0;
  --rc-muted: #aaabac;
  --rc-border: #464648;
  --rc-accent: #7d7e81;
  --rc-link: #f2f2f0;
  --rc-focus: #aaabac;
  /* Compatibility tokens used by the imported WordPress Global CSS. */
  --rc-bg: var(--rc-background);
  --rc-bg-soft: var(--rc-surface-soft);
  --rc-faint: color-mix(in srgb, var(--rc-text) 42%, transparent);
  --rc-line: var(--rc-border);
}

/* Site-wide link affordance: subtle at rest, unmistakable on hover/focus. */
body a[href]:not(.elementor-button):not(.wp-element-button):not(.button):not(.rc-theme-toggle):not(.rc-menu-toggle):not(.elementor-social-icon):not(.rc-social-link):not(:has(img)) {
	background-image:linear-gradient(currentColor,currentColor);
	background-position:0 100%;
	background-repeat:no-repeat;
	background-size:0 1px;
	text-decoration:none;
	transition:background-size 220ms ease,color 180ms ease,opacity 180ms ease;
}
body a[href]:not(.elementor-button):not(.wp-element-button):not(.button):not(.rc-theme-toggle):not(.rc-menu-toggle):not(.elementor-social-icon):not(.rc-social-link):not(:has(img)):hover,
body a[href]:not(.elementor-button):not(.wp-element-button):not(.button):not(.rc-theme-toggle):not(.rc-menu-toggle):not(.elementor-social-icon):not(.rc-social-link):not(:has(img)):focus-visible {
	background-size:100% 1px;
}
body a[href]:focus-visible {
	outline:1px solid currentColor;
	outline-offset:4px;
}
body a[href]:has(img):hover img,
body a[href]:has(img):focus-visible img {
	opacity:.86;
}
body a[href]:has(img) img { transition:opacity 180ms ease; }
@media(prefers-reduced-motion:reduce){body a[href]{transition:none!important}}

html,
body,
.site,
.site-content,
.elementor-location-header,
.elementor-location-footer,
.elementor-location-single,
.elementor-location-archive {
  background-color: var(--rc-background) !important;
  color: var(--rc-text);
  transition: background-color 180ms ease, color 180ms ease;
}

.rc-theme-dark body :where(.e-con, .elementor-section, .elementor-column-wrap)[style*="background-color"],
.rc-theme-light body :where(.e-con, .elementor-section, .elementor-column-wrap)[style*="background-color"] {
  background-color: transparent !important;
}

.rc-theme-dark body img:not(.emoji):not(.avatar) {
  background: #fff;
  box-sizing: border-box;
  padding: var(--rc-dark-image-padding, 3px);
}

/* Make dark-first legacy Global CSS readable in the light theme. */
.rc-theme-light .rc-nav .elementor-item,
.rc-theme-light .rc-footer-cta-text,
.rc-theme-light .rc-project-type,
.rc-theme-light .rc-project-teaser,
.rc-theme-light .rc-project-year {
  color: var(--rc-muted) !important;
}

.rc-theme-light .rc-header-social .elementor-social-icon {
  border-color: var(--rc-border);
  color: var(--rc-muted) !important;
}

.rc-theme-light .rc-link,
.rc-theme-light .rc-project-link {
  border-color: var(--rc-border);
  color: var(--rc-text);
}

.rc-theme-light .rc-title { color: var(--rc-text); }

.rc-theme-light .rc-divider-bg {
  filter: grayscale(100%) brightness(.82) contrast(.88);
}

.rc-theme-light .rc-divider-bg::before {
  background: color-mix(in srgb, var(--rc-background) 20%, transparent);
}

.rc-theme-light .rc-divider-bg::after {
  background: linear-gradient(to bottom, var(--rc-background) 0%, transparent 40%, transparent 60%, var(--rc-background) 100%);
}

/* Remove the warm legacy palette when dark mode is active. */
.rc-theme-dark .rc-page {
  background: radial-gradient(circle at 78% 18%, rgb(125 126 129 / .08), transparent 32%), var(--rc-background);
}

.rc-theme-dark .rc-title,
.rc-theme-dark .rc-project-title,
.rc-theme-dark .rc-project-title .elementor-heading-title,
.rc-theme-dark .rc-feature-card-title,
.rc-theme-dark .rc-feature-card-button {
  color: var(--rc-text);
}

.rc-theme-dark .rc-nav .elementor-item,
.rc-theme-dark .rc-footer-cta-text,
.rc-theme-dark .rc-project-type,
.rc-theme-dark .rc-project-teaser,
.rc-theme-dark .rc-project-year,
.rc-theme-dark .rc-feature-card-description,
.rc-theme-dark .rc-feature-card-year {
  color: var(--rc-muted) !important;
}

.rc-theme-dark .rc-header-social .elementor-social-icon {
  border-color: var(--rc-border);
  color: var(--rc-muted) !important;
}

.rc-theme-dark .rc-link,
.rc-theme-dark .rc-project-link,
.rc-theme-dark .rc-feature-card-button {
  border-color: var(--rc-border);
}

.rc-theme-dark .rc-feature-card,
.rc-theme-dark .rc-project-image {
  background: var(--rc-surface);
}

.rc-theme-dark .rc-nav .elementor-item:hover,
.rc-theme-dark .rc-nav .elementor-item.elementor-item-active,
.rc-theme-dark .rc-link:hover,
.rc-theme-dark .rc-project-link:hover,
.rc-theme-dark .rc-feature-card-button:hover {
  border-color: var(--rc-accent);
  color: var(--rc-accent) !important;
}

/* Header contrast must follow the selected mode, never the legacy dark default. */
.rc-theme-light .rc-header {
  background: rgb(245 241 233 / .96) !important;
  border-bottom-color: #cec6ba !important;
  color: #171614 !important;
}

.rc-theme-light .rc-header :where(.rc-logo, .rc-logo a, .elementor-heading-title) {
  color: #171614 !important;
}

.rc-theme-light .rc-header .rc-nav .elementor-item {
  color: #68635b !important;
}

.rc-theme-light .rc-header .rc-nav .elementor-item:hover,
.rc-theme-light .rc-header .rc-nav .elementor-item.elementor-item-active {
  color: #a84831 !important;
}

.rc-theme-dark .rc-header {
  background: rgb(14 14 14 / .96) !important;
  border-bottom-color: #464648 !important;
  color: #f2f2f0 !important;
}

.rc-theme-dark .rc-header :where(.rc-logo, .rc-logo a, .elementor-heading-title) {
  color: #f2f2f0 !important;
}

.rc-theme-dark .rc-header .rc-nav .elementor-item {
  color: #aaabac !important;
}

.rc-theme-dark .rc-header .rc-nav .elementor-item:hover,
.rc-theme-dark .rc-header .rc-nav .elementor-item.elementor-item-active {
  color: #f2f2f0 !important;
}

.rc-theme-light .rc-header .elementor-social-icon {
  border-color: #cec6ba !important;
  color: #68635b !important;
}

.rc-theme-dark .rc-header .elementor-social-icon {
  border-color: #464648 !important;
  color: #aaabac !important;
}

/* Final dark-mode typography guard against Elementor widget-level colors. */
.rc-theme-dark body :where(
  h1, h2, h3, h4, h5, h6,
  p, li, dt, dd, blockquote, figcaption,
  label, legend, summary,
  a, button,
  .elementor-heading-title,
  .elementor-widget-text-editor,
  .elementor-widget-text-editor p,
  .elementor-button-text,
  .elementor-icon-list-text,
  .rc-bg-kicker, .rc-bg-title, .rc-bg-body,
  .rc-kicker, .rc-section-title, .rc-section-small,
  .rc-practice-number, .rc-practice-title, .rc-practice-text,
  .rc-process-number, .rc-process-title, .rc-process-text,
  .rc-contact-title, .rc-contact-text, .rc-contact-email
) {
  color: #f2f2f0 !important;
}

.rc-theme-dark body :where(input, textarea, select)::placeholder {
  color: #aaabac !important;
  opacity: 1;
}

.rc-theme-dark body :where(svg, svg path) {
  color: currentColor;
}

/* Highlight blocks need dark lettering to remain readable on a light fill. */
.rc-theme-dark body .rc-highlight-word.is-highlighted {
  color: #171715 !important;
}

/* Elementor can nest its color declarations on arbitrary spans and wrappers. */
.rc-theme-dark body .elementor,
.rc-theme-dark body .elementor :where(div, section, article, header, footer, main, nav, h1, h2, h3, h4, h5, h6, p, span, strong, em, small, li, a, button, label, blockquote, figcaption) {
  color: #f2f2f0 !important;
}

.rc-theme-dark body .elementor .rc-highlight-word.is-highlighted {
  color: #171715 !important;
}

/* Practice cards are true light surfaces in light mode. */
.rc-theme-light .rc-practice-grid {
  background: #cec6ba !important;
  border-color: #cec6ba !important;
}

.rc-theme-light .rc-practice-item {
  background: #fffdf8 !important;
  border-color: #cec6ba !important;
  color: #171614 !important;
}

.rc-theme-light body .elementor .rc-practice-item :where(h1, h2, h3, h4, h5, h6, p, span, strong, em, small, a, div) {
  color: #171614 !important;
}

.rc-theme-light body .elementor .rc-practice-item .rc-practice-number {
  color: #68635b !important;
}

.rc-theme-light body .elementor .rc-practice-item .rc-practice-text,
.rc-theme-light body .elementor .rc-practice-item .rc-practice-text :where(p, span) {
  color: #68635b !important;
}

.rc-theme-light body .elementor .rc-practice-item .rc-highlight-word.is-highlighted {
  color: #171715 !important;
}

/* Background page is a complete light canvas in light mode. */
.rc-theme-light .rc-bg-page,
.rc-theme-light .rc-bg-page .rc-bg-section,
.rc-theme-light .rc-bg-page .rc-bg-hero,
.rc-theme-light .rc-bg-page .rc-bg-about,
.rc-theme-light .rc-bg-page .rc-quote {
  background: #f5f1e9 !important;
  background-image: none !important;
  border-color: #cec6ba !important;
  color: #171614 !important;
}

.rc-theme-light body .elementor .rc-bg-page :where(h1, h2, h3, h4, h5, h6, p, span, strong, em, small, a, div, blockquote) {
  color: #171614 !important;
}

.rc-theme-light body .elementor .rc-bg-page :where(.rc-bg-kicker, .rc-bg-intro, .rc-bg-body, .rc-bg-body p) {
  color: #68635b !important;
}

.rc-theme-light body .elementor .rc-bg-page .rc-bg-title {
  color: #171614 !important;
}

.rc-theme-light body .elementor .rc-bg-page .rc-highlight-word.is-highlighted {
  color: #171715 !important;
}

/* Site-wide light mode: override dark-first Elementor CSS on every template. */
.rc-theme-light body,
.rc-theme-light body .site,
.rc-theme-light body .site-content,
.rc-theme-light body main,
.rc-theme-light body .elementor,
.rc-theme-light body .elementor-location-single,
.rc-theme-light body .elementor-location-archive,
.rc-theme-light body [class*="rc-"][class*="-page"] {
  background-color: #f5f1e9 !important;
  color: #171614 !important;
}

/* Page wrappers may contain dark radial gradients in the legacy CSS. */
.rc-theme-light body [class*="rc-"][class*="-page"] {
  background-image: none !important;
}

.rc-theme-light body .elementor :where(
  .e-con,
  .e-con-inner,
  .elementor-section,
  .elementor-section-wrap,
  .elementor-column,
  .elementor-column-wrap,
  .elementor-widget-wrap,
  [class*="rc-"][class*="-section"],
  [class*="rc-"][class*="-hero"],
  [class*="rc-"][class*="-strip"]
) {
  background-color: transparent !important;
  border-color: #cec6ba !important;
}

/* Cards remain distinct, using a light surface instead of black. */
.rc-theme-light body .elementor :where(
  [class*="rc-"][class*="-card"],
  [class*="rc-"][class*="-item"]
) {
  background-color: #fffdf8 !important;
  border-color: #cec6ba !important;
}

.rc-theme-light body .elementor :where(
  h1, h2, h3, h4, h5, h6,
  p, li, dt, dd, blockquote, figcaption,
  label, legend, summary,
  a, button,
  .elementor-heading-title,
  .elementor-widget-text-editor,
  .elementor-widget-text-editor p,
  .elementor-button-text,
  .elementor-icon-list-text
) {
  color: #171614 !important;
}

.rc-theme-light body .elementor :where(
  small,
  .rc-kicker,
  [class*="rc-"][class*="-kicker"],
  [class*="rc-"][class*="-number"],
  [class*="rc-"][class*="-text"],
  [class*="rc-"][class*="-intro"],
  [class*="rc-"][class*="-body"]
) {
  color: #68635b !important;
}

.rc-theme-light body :where(input, textarea, select) {
  background: #fffdf8 !important;
  border-color: #cec6ba !important;
  color: #171614 !important;
}

.rc-theme-light body :where(input, textarea, select)::placeholder {
  color: #68635b !important;
  opacity: 1;
}

/* Keep media intact; only its surrounding canvas changes with the theme. */
.rc-theme-light body .elementor :where(img, picture, video, iframe, canvas, svg) {
  background-color: transparent;
}

.rc-theme-light body .elementor .rc-highlight-word.is-highlighted {
  color: #171715 !important;
}

.rc-theme-toggle {
  align-items: center;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 999px;
  bottom: 1.25rem;
  box-shadow: 0 4px 20px rgb(0 0 0 / .14);
  color: var(--rc-text);
  cursor: pointer;
  display: flex;
  height: 3rem;
  justify-content: center;
  padding: 0;
  position: fixed;
  right: 1.25rem;
  width: 3rem;
  z-index: 99999;
}

.rc-theme-toggle svg {
  fill: none;
  height: 1.35rem;
  position: absolute;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 1.35rem;
}

.rc-theme-toggle__sun,
.rc-theme-dark .rc-theme-toggle__moon { display: none; }
.rc-theme-dark .rc-theme-toggle__sun { display: block; }

.rc-theme-toggle__hint {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: 999px;
  color: var(--rc-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  opacity: 0;
  padding: .55rem .8rem;
  pointer-events: none;
  position: absolute;
  right: calc(100% + .65rem);
  text-transform: uppercase;
  transform: translateX(.5rem);
  transition: opacity .3s ease, transform .3s ease;
  visibility: hidden;
  white-space: nowrap;
}

.rc-theme-toggle--hint {
  animation: rc-theme-hint-pulse 1.8s ease-in-out 3;
}

.rc-theme-toggle--hint .rc-theme-toggle__hint {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
}

@keyframes rc-theme-hint-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgb(0 0 0 / .14), 0 0 0 0 color-mix(in srgb, var(--rc-accent) 45%, transparent); }
  50% { box-shadow: 0 4px 20px rgb(0 0 0 / .14), 0 0 0 9px transparent; transform: translateY(-3px); }
}

.rc-highlight-word {
  border-radius: .02em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: #171715;
  display: inline;
  margin-inline: -.035em;
  padding: .04em .075em .09em;
  transition: background-color 220ms ease, color 220ms ease;
}

.rc-highlight-word.is-highlighted {
  background-color: var(--rc-word-highlight, #e8bca8);
  color: #171715;
}

@media (prefers-reduced-motion: reduce) {
  html, body, .site, .site-content { transition: none; }
  .rc-highlight-word { transition: none; }
	.rc-theme-toggle--hint { animation: none; }
	.rc-theme-toggle__hint { transition: none; }
}

/* Keep first-visit consent and appearance controls in separate mobile zones. */
@media (max-width: 600px) {
  body.rc-cookie-consent-unset .rc-theme-toggle {
    bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  }

  .rc-theme-toggle__hint {
    display: none !important;
  }
}
