/* Chamkakala Legal R60.5: sitewide public-page theme; scoped to r47-page.
   Does not style login, private portal, administration, or enquiry workflows. */
.cl-theme-control {
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem;
  min-height:44px; min-width:44px; padding:.48rem .8rem;
  background:transparent; border:1px solid rgba(215,194,148,.52); border-radius:999px;
  color:#e9d7ab; font:600 14px/1.2 system-ui,-apple-system,sans-serif;
  cursor:pointer; white-space:nowrap; transition: background-color .18s,border-color .18s;
}
.cl-theme-control:hover {background:rgba(215,194,148,.13);border-color:#d5bc85}
.cl-theme-control:focus-visible {outline:3px solid #ddb970;outline-offset:3px}
.cl-theme-icon {font-family:system-ui,sans-serif;font-size:21px;line-height:1}
.r47-page .desktop-nav .cl-theme-control {margin-left:.3rem; flex:0 0 auto}
.r47-page .mobile-menu .cl-theme-control {margin:10px 20px 16px; width:calc(100% - 40px);}
@media (max-width:1020px){.r47-page .desktop-nav .cl-theme-caption{display:none}.r47-page .desktop-nav .cl-theme-control{padding:.45rem}}
@media (prefers-reduced-motion:reduce){.cl-theme-control{transition:none}}

/* Shared palette — keeps ivory/gold site style intact in day mode. */
html.cl-dark{color-scheme:dark; background:#0b1724}
html.cl-dark body.r47-page{
  --r47-navy:#081b2c; --r47-muted:#bac6d0; --r47-paper:#101e2c;
  --r47-border:#35485b; --r51-line:#33495c; --r51-paper:#0e1c2b;
  background:#0b1724!important; color:#ece9e2!important;
}
html.cl-dark .r47-page main,html.cl-dark .r47-page #main-content {background:#0b1724!important;color:#ece9e2!important}
html.cl-dark .r47-page .r47-section,
html.cl-dark .r47-page .r47-ivory,
html.cl-dark .r47-page .r51-section,
html.cl-dark .r47-page .page-section,
html.cl-dark .r47-page .r48-feed,
html.cl-dark .r47-page .r51-insights,
html.cl-dark .r47-page .reading-panel,
html.cl-dark .r47-page .article-body {
  background:#0d1b29!important; color:#ece9e2!important;
}
html.cl-dark .r47-page .r47-section:nth-of-type(even){background:#112235!important}
html.cl-dark .r47-page .r47-section+.r47-section{border-top-color:#344559!important}
html.cl-dark .r47-page .r47-card,
html.cl-dark .r47-page .r48-card,
html.cl-dark .r47-page .r51-card,
html.cl-dark .r47-page .article-card,
html.cl-dark .r47-page .card,
html.cl-dark .r47-page .r47-form,
html.cl-dark .r47-page .r48-feed-card,
html.cl-dark .r47-page .r48-feed-item,
html.cl-dark .r47-page .newsletter,
html.cl-dark .r47-page .profile-card,
html.cl-dark .r47-page .r47-status,
html.cl-dark .r47-page .details-card,
html.cl-dark .r47-page .subscribe-form,
html.cl-dark .r47-page .r48-feed-search,
html.cl-dark .r47-page .r51-publication-card {
  background:#14293d!important;color:#f0ece3!important;border-color:#385067!important;
  box-shadow:none!important;
}
html.cl-dark .r47-page .r47-card:hover,
html.cl-dark .r47-page .article-card:hover{border-color:#c8b17b!important}
html.cl-dark .r47-page h1,html.cl-dark .r47-page h2,html.cl-dark .r47-page h3,
html.cl-dark .r47-page h4,html.cl-dark .r47-page h5,
html.cl-dark .r47-page p,html.cl-dark .r47-page li,
html.cl-dark .r47-page .reading,html.cl-dark .r47-page .lead,
html.cl-dark .r47-page .r47-card h3,html.cl-dark .r47-page .r47-card p,
html.cl-dark .r47-page .r48-feed-card p,html.cl-dark .r47-page .r51-section-heading>p,
html.cl-dark .r47-page .r47-page-content,
html.cl-dark .r47-page blockquote,
html.cl-dark .r47-page time {
  color:#e7e6e0!important;
}
html.cl-dark .r47-page .label,html.cl-dark .r47-page .eyebrow,
html.cl-dark .r47-page .r47-card .label,
html.cl-dark .r47-page .meta,
html.cl-dark .r47-page .r47-tag {color:#e0c58b!important}
html.cl-dark .r47-page a:not(.button):not(.header-cta):not(.button-gold):not(.button-navy):not(.cl-theme-control) {color:#d9c18f}
html.cl-dark .r47-page a:hover{color:#f4daa0}
html.cl-dark .r47-page .r47-card .read-link,
html.cl-dark .r47-page .arrow-link {color:#d9c18f!important}
html.cl-dark .r47-page hr,
html.cl-dark .r47-page details,
html.cl-dark .r47-page .checklist label {border-color:#35475b!important}
html.cl-dark .r47-page input,html.cl-dark .r47-page select,
html.cl-dark .r47-page textarea {
  color:#f2eee7!important; background:#0d2133!important; border-color:#61758a!important;
}
html.cl-dark .r47-page input::placeholder,html.cl-dark .r47-page textarea::placeholder{color:#b4bec8!important}
html.cl-dark .r47-page .r47-form label,html.cl-dark .r47-page .r47-field{color:#f1e8d4!important}
html.cl-dark .r47-page .r47-hero,
html.cl-dark .r47-page .r47-home-hero,
html.cl-dark .r47-page .r47-cta {background:linear-gradient(112deg,#06121f,#0e2a40 75%,#14344d)!important;color:#f5f1e8!important}
html.cl-dark .r47-page .r47-hero *,html.cl-dark .r47-page .r47-cta *{color:inherit}
html.cl-dark .r47-page .launch-notice{background:#213247!important;color:#e5dfd2!important}
html.cl-dark .r47-page .site-footer{background:#071522!important;color:#e9e1d4!important}
html.cl-dark .r47-page .site-footer p,
html.cl-dark .r47-page .site-footer a{color:#e4dac4!important}
html.cl-dark .r47-page .site-footer a:hover{color:#f3d592!important}
html.cl-dark .r47-page .r47-form button.button-navy,
html.cl-dark .r47-page .button-navy{background:#cdb279!important;color:#0a1b29!important;border-color:#cdb279!important}
html.cl-dark .r47-page a:focus-visible,html.cl-dark .r47-page button:focus-visible{
 outline:3px solid #e8c682!important; outline-offset:3px;
}

/* Gold buttons must retain dark ink against gold in night mode. */
html.cl-dark .r47-page .r47-cta .button-gold,
html.cl-dark .r47-page .r47-hero .button-gold,
html.cl-dark .r47-page .button-gold {color:#081e2e!important;}
html.cl-dark .r47-page .r47-cta .button-gold *,
html.cl-dark .r47-page .r47-hero .button-gold *{color:#081e2e!important;}
html.cl-dark .r47-page .r47-hero em {color:#dfc791!important;}


/* ================================================================
   R60.6 contrast repair for the ACTUAL inner-page markup.
   R60.5 changed text to ivory but left light section/card backgrounds
   untouched: this block fixes BOTH sides of the colour pairing.
   Applies only when cl-dark is selected; no day-mode visual changes.
   ================================================================ */
html.cl-dark body.r47-page {
  --ink:#f0eee7;
  --muted:#bcc9d4;
  --reading-ink:#e3e8eb;
  --cream:#0b1927;
  --paper:#102436;
  --ivory:#102332;
  --line:rgba(198,213,226,.22);
  --shadow:0 14px 45px rgba(0,0,0,.15);
  background:#0b1927!important;
  color:#f0eee7!important;
}
/* Page-width light sections, absent from the old R60.5 selectors. */
html.cl-dark body.r47-page main :is(
  .section-white,.section-ivory,.section-paper,.publication-library,
  .featured-publication,.profile-section,.r48-experience,.r48-legacy-experience,
  .r51-thinking,.r51-home-sections,.r48-office,.r48-office-layout,
  .r48-feed-layout,.r48-experience-heading
){background:#0e2030!important;color:#f0eee7!important}
html.cl-dark body.r47-page main :is(.section-white,.featured-publication,.publication-library,.r48-legacy-experience){
  border-color:#33495b!important;
}
/* Keep blue/navy hero, card headers and dedicated navy call-outs navy. */
html.cl-dark body.r47-page main :is(.r47-hero,.r47-cta,.publishing-hero,.article-hero,.inner-hero){
  background:linear-gradient(120deg,#071725,#12334a)!important;
  color:#f5f1e8!important;
}
/* Real card classes in Insights, Experience, Leadership and Expertise. */
html.cl-dark body.r47-page main :is(
  .feature-story,.publication-card,.publication-card-body,
  .insight-card,.testimonial-card,.lead-profile,.r48-profile-card,.r48-post,
  .r48-feed-search,.r48-office-row,.r48-case-form,.r48-case-result,
  .r51-story-card,.r51-section-card,.r51-partner-intro,
  .profile-call-menu,.details-card,.r47-card,.r47-form
){
  background-color:#182f43!important;
  color:#f0eee7!important;
  border-color:#405b71!important;
  box-shadow:none!important;
}
html.cl-dark body.r47-page main :is(
  .r48-outcome,.r48-sources,.r48-post-actions,.profile-credentials,
  .profile-focus,.feature-story-copy,.r48-post-body,.r48-profile-info,
  .publication-card-body,.r51-story-body,.r51-section-summary
){color:#e6e9e9!important;border-color:#40566c!important}
html.cl-dark body.r47-page main .r48-outcome{
  background:#21384a!important;
  border-color:#43596c!important;
}
/* Restore proper muted text instead of the original near-white-on-white. */
html.cl-dark body.r47-page main :is(
  .publishing-note,.insight-meta,.publication-card-body>p:not(.insight-meta),
  .feature-story-copy>p:not(.insight-meta),.r48-result-count,
  .r48-profile-location,.r48-experience-heading .r48-attribution,
  .r48-post .r48-case-reference,.r48-post .r48-date,
  .r48-post .r48-context,.r48-post .r48-source-note,
  .r48-author p,.r51-section-summary,.r51-intro-copy>p:not(.eyebrow),
  .r51-partner-summary,.profile-copy>p:not(.label),
  .profile-focus li,.practice-services li,.profile-call-number small
){color:#c2ced9!important}
html.cl-dark body.r47-page main :is(
  .feature-story-copy h2,.publication-card-body h3,.r48-post h2,
  .r48-post h3,.r48-profile-info h2,.r51-section-card h3,
  .r51-partner-intro,.profile-copy .profile-intro,
  .profile-credentials p:last-child,.profile-email
){color:#f0eee7!important}
/* Gold remains legible on navy; gold CTA buttons retain dark lettering. */
html.cl-dark body.r47-page main :is(.r48-role strong,.r48-status-label,.read-link,.eyebrow,.r47-tag){color:#e7c68b!important}
html.cl-dark body.r47-page main :is(.button-gold,.filter-chip.active,.filter-chip[aria-pressed="true"],.r51-practice-filters button[aria-pressed="true"]){
  background:#d7b979!important;
  color:#0a1d2d!important;
  border-color:#d7b979!important;
}
html.cl-dark body.r47-page main :is(.button-gold,.filter-chip.active,.filter-chip[aria-pressed="true"]) *{color:#0a1d2d!important}
html.cl-dark body.r47-page main :is(.filter-chip,.r51-practice-filters button,.r48-feed-search button){
  border-color:#65788b;
}
html.cl-dark body.r47-page main :is(.filter-chip:not(.active),.r51-practice-filters button:not([aria-pressed="true"]),.r48-case-form button){
  background:#192e41!important;
  color:#e7e9eb!important;
}
html.cl-dark body.r47-page main :is(.publication-tools,.search-box,.r48-feed-search,.r51-practice-filters){
  border-color:#40576c!important;
}
html.cl-dark body.r47-page main :is(input,select,textarea){
  background:#112638!important;
  color:#f4f0e7!important;
  border-color:#708399!important;
  color-scheme:dark;
}
html.cl-dark body.r47-page main :is(input,textarea)::placeholder{color:#b8c5d1!important;opacity:1}
html.cl-dark body.r47-page main :is(.search-box input,.r48-feed-search input,.r48-feed-search select){
  background:#102537!important;
  color:#f1ece5!important;
  border-color:#6c8195!important;
}
/* Main typography should remain readable even when old styles use fixed navy ink. */
html.cl-dark body.r47-page main :is(.r48-experience,.publication-library,.featured-publication,.section-white,.section-ivory,.profile-section) :is(h1,h2,h3,h4,h5,p,li,blockquote,time){
  color:#eae8e2!important;
}
/* Preserve special panel hierarchy and navigation labels after the broad fix. */
html.cl-dark body.r47-page main :is(.card-blue,.card-green,.card-wine,.visual-markets,.publication-card-top,.feature-story-visual){
  background-color:#14324b!important;
}
html.cl-dark body.r47-page main :is(.publication-card-top,.feature-story-visual) :is(span,b,p){color:#f5e6c3!important}
html.cl-dark body.r47-page main :is(.publication-card,.feature-story,.r48-post,.r48-profile-card){
  outline-color:#425a6d;
}
/* Maintain readable paper printouts even when browsing with Night mode. */
@media print{
 html.cl-dark body.r47-page,html.cl-dark body.r47-page main,
 html.cl-dark body.r47-page main section,html.cl-dark body.r47-page main article,
 html.cl-dark body.r47-page main div{
  background:white!important;color:#121212!important;box-shadow:none!important;
 }
 html.cl-dark body.r47-page main :is(h1,h2,h3,h4,h5,p,li,time,blockquote,a){color:#121212!important}
 .cl-theme-control{display:none!important}
}
