/* FIXABL follows the device. Native media queries also react to changes while
   the page is open, without a saved preference, script, or first-paint flash.
   Photographs and illustration files retain their original colors. */
:root { color-scheme: light dark; }
@media (prefers-color-scheme: dark) and (forced-colors: none) {
  :root {
    --night-canvas:#101725;
    --night-surface:#192334;
    --night-raised:#223047;
    --night-ink:#edf1f7;
    --night-muted:#b7c4d7;
    --night-soft:#9eafc7;
    --night-link:#adc4ff;
    --night-line:#40516a;
    --night-glass:#192334ed;
    --night-focus:#e5b58d;
    --site-ink:var(--night-ink);
    --site-muted:var(--night-muted);
    --site-blue:var(--night-link);
    --site-line:var(--night-line);
    background:var(--night-canvas);
    color:var(--night-ink);
    accent-color:#9fb5f6;
    scrollbar-color:#61728e var(--night-canvas);
  }
  body,.full-site,#fx-home { background:var(--night-canvas);color:var(--night-ink); }
  .site-skip { background:var(--night-raised);color:var(--night-ink); }
  .recovery-search label { color:var(--night-ink); }
  ::selection { background:#5569a6;color:#fff; }
  input,textarea,select { caret-color:#edba94; }
  body :is(a,button,summary,input,textarea,select):focus-visible { outline-color:var(--night-focus)!important; }

  /* One night sky joins the hero to the page. */
  .fx-mast {
    background:linear-gradient(to bottom,transparent 52%,var(--night-canvas) 100%),
      radial-gradient(ellipse at 100% 0,#874c38 0,transparent 54%),
      radial-gradient(ellipse at 65% 38%,#604b78 0,transparent 64%),
      linear-gradient(130deg,#21366e,#423c68 72%,#624a62);
  }
  .fx-explore,.fx-stories,.fx-proof { background:transparent; }
  .site-hero,.site-cta,.site-guide-feature,.footer-invitation,.footer-trust-band,
  .content-answer,.ecosystem-new,.content-project-reference,.site-contact-card {
    background:linear-gradient(125deg,#1e2b40,#282a3e 72%,#322b32);
    color:var(--night-ink);border-color:var(--night-line);box-shadow:inset 0 1px 0 #ffffff07;
  }
  .site-card,.fx-result,.fx-owner,.site-form,.site-no-results,.fx-empty,
  .site-quote,.site-credential-grid article,.site-credential-grid article.credential-card,
  .site-credential-grid .credential-maz,.experience-card,.service-lane,
  .site-search-result,.recovery-card,.discovery-feature,.fx-inline-detail,dialog.fx-detail {
    background:var(--night-surface);color:var(--night-ink);border-color:var(--night-line);
    box-shadow:inset 0 1px 0 #ffffff05;
  }
  .site-soft,.content-checklist,.content-comparison-grid>section,.content-guide-outline,
  .recovery-person,.directory-empty,.analytics-settings,.site-tabs,.site-home-more a {
    background:#1b273b;color:var(--night-ink);border-color:var(--night-line);
  }
  .site-card-media,.site-service-hero figure,.site-illustration,.fx-service-visual,
  .fx-service-art,.notebook-entry-media,.discovery-feature-image,.discovery-choice-image,
  .fx-suggestion-photo,.site-guide-feature .guide-teaser-media,.work-entry figure {
    background:var(--night-raised);
  }
  .site-card:active,.fx-result:active { background:var(--night-raised); }

  /* Text levels, including longer articles and quiet legal pages. */
  .fx-result>strong,.site-contact-address,.site-information,.site-information h1,
  .site-information h2,.experience-card h3,.personal-process strong,.service-lane h2,
  .service-owner-note p,.service-menu-item,.work-entry,.notebook-entry,
  .site-article .content-comparison h3,.content-answer>p:last-child,
  .site-search-result>.nav-result-copy>h3,.site-contact-card { color:var(--night-ink); }
  .fx-section-head p,.fx-result>span,.fx-detail p,.fx-stories p,.fx-proof p,
  .site-lead,.site-soft li,.site-card-copy p,.site-guide-feature p,.site-faq details p,
  .site-cta p,.site-article p,.site-article-aside p,.site-credential-grid p,.site-contact-aside p,
  .site-contact-card>p,.site-quote>blockquote,.site-form label,#enquiry-preview,
  .content-detail-copy p,.content-service-region,.content-link-list span span,
  .content-project-notes p,.content-local-places p,.content-home-library p,
  .content-ecosystems>div:first-child>p:last-child,.ecosystem-choices p,.ecosystem-new>span>span,
  .content-comparison dd,.content-comparison dt,.experience-intro,.experience-card p,
  .personal-process p,.site-information .information-lead,.service-menu-item p,
  .service-not-sure p,.work-caption p,.work-next p:not(.directory-eyebrow),
  .notebook-feature-copy>p:not(.directory-eyebrow),.notebook-entry-copy>p:not(.notebook-meta),
  .notebook-help p,.recovery-person p,.recovery-card strong+span,
  .recovery-heading>p:last-child:not(.site-kicker),.discovery-unavailable p,
  .site-search-result p,.site-search-result>.nav-result-copy>p { color:var(--night-muted); }
  .site-kicker,.site-muted,.site-breadcrumb,.site-card-copy small,.site-result-count,
  .site-quote>small,.site-quote>span,.site-credential-grid article>span,.site-form-head>span,
  .site-information .information-date,.fx-result>small,.fx-project-photos small,
  .content-byline,.content-link-list small,.content-sources p,.content-source-caption,
  .site-article-image figcaption,.site-project-large figcaption,.content-image-note,
  .ecosystem-choices small,.ecosystem-new small,.credential-card .credential-small,
  .credential-maz small,.directory-page .directory-eyebrow,.directory-page [data-directory-count],
  .service-owner-note span,.service-lane-heading>p:last-child,.service-menu-item .service-menu-more,
  .work-category,.notebook-masthead>span,.notebook-topic,.notebook-feature-action>small,
  .notebook-entry .notebook-meta,.notebook-meta>span,.recovery-card small,
  .site-search-result small,#search-status,.fx-foot { color:var(--night-soft); }
  .fx-result>b,.fx-stories figcaption a,.fx-owner a,.fx-owner .fx-owner-name,.fx-proof a,
  .fx-project-strip a,.site-breadcrumb a,.site-card-action,.site-no-results a,.site-quote>a,
  .site-section-heading a,.site-article-aside>a,.site-credential-grid a,.site-text-link,
  .site-information a,.content-link-list>a,.content-sources a,.content-local-places a,
  .content-home-links a,.ecosystem-choices>a>span,.content-comparison a,.content-credential-link a,
  .content-guide-outline nav a,.experience-card a,.credential-card .trust-tag,.credential-card a,
  .directory-text-link,.notebook-feature-action,.notebook-read,.recovery-person a,
  .discovery-fallback-links a { color:var(--night-link); }
  .fx-result:hover strong,.site-information a:hover,.site-information a:focus-visible,
  .content-service-region a:hover,.content-comparison a:hover,.content-credential-link a:hover,
  .directory-text-link:hover,.notebook-entry:hover h2 { color:#d0ddff; }
  .directory-page { --directory-ink:var(--night-ink);--directory-muted:var(--night-muted); }

  /* Header and page-filling search remain at the same coordinates in each mode. */
  .site-header-shared { color:var(--night-ink); }
  .site-header-shared:not(.site-header-home) .fx-logo-stage,
  .site-header-shared.header-pinned .fx-logo-stage,
  .site-header-shared:not(.site-header-home).header-pinned .brand-resting,
  .site-footer .footer-logo>img { filter:none; }
  .site-header-shared .fx-logo-stage::after {
    background:linear-gradient(to right,#ff762d 8%,#ee8052 37%,#cb7b9d 65%,#8696ff 100%);
  }
  .site-header-shared .brand-stop-1 { stop-color:#ff762d; }
  .site-header-shared .brand-stop-2 { stop-color:#ee8052; }
  .site-header-shared .brand-stop-3 { stop-color:#cb7b9d; }
  .site-header-shared .brand-stop-4 { stop-color:#8696ff; }
  .shared-call,.site-header-home .shared-call,.site-header-shared.search-open>.shared-call,
  .site-header-shared.search-open:not(.search-short)>.shared-call {
    background:var(--night-raised);color:var(--night-ink)!important;border-color:#66768f;box-shadow:none;
  }
  .site-header-shared>.shared-search,
  .site-header-shared.search-open>.shared-search[aria-expanded=true],.shared-menu nav {
    background:#1c2941b8;color:var(--night-ink);border-color:#66768f;box-shadow:none;
  }
  .shared-nav>a:hover,.shared-nav>a[aria-current=page],.shared-search:hover,
  .shared-menu nav>a:hover,.site-header-shared.search-open>.shared-call:hover { background:#ffffff12; }
  .discovery-backdrop {
    background:linear-gradient(130deg,#101b30f2,#171d2df2 55%,#2a222bf2);
  }
  .nav-search-form,.site-header-shared.search-open .nav-search-form,
  .fx-search-row,.recovery-search>div,.directory-search,.notebook-search {
    background:#121c2ce8;color:var(--night-ink);border-color:#52657f;box-shadow:0 6px 24px #00000014;
  }
  .nav-search-form input,.fx-search,.recovery-search input,.directory-search input { color:var(--night-ink); }
  .nav-search-form input::placeholder,.fx-search::placeholder,.directory-search input::placeholder,
  .recovery-search input::placeholder { color:#a6b5cc;opacity:1; }
  .nav-search-form>svg,.site-header-shared .nav-search-form>svg,.directory-search>.fx-icon { color:#b6c6df; }
  .site-header-shared .nav-search-panel { color:var(--night-ink); }
  .site-header-shared .nav-search-directory,.browse-fallback,.nav-search-result,
  .site-header-shared .nav-search-hint { color:var(--night-ink); }
  .browse-heading,.browse-copy small,.browse-icon,.browse-secondary :is(svg,img),
  .site-header-shared .nav-search-key,.site-header-shared .nav-search-status,
  .site-header-shared .nav-result-copy>small,.site-header-shared .nav-result-copy>span,
  .nav-result-copy>span,.nav-result-copy>small,.nav-search-empty p,.nav-search-footer,
  .nav-search-contact>.nav-search-contact-prompt,.discovery-note,.discovery-refinements>p,
  .discovery-reading-heading,.discovery-read small,.discovery-feature-copy>small,
  .discovery-clear,.discovery-feature-arrow { color:var(--night-muted); }
  .browse-arrow,.nav-result-symbol,.discovery-read-icon,.discovery-choice-symbol,
  .search-page-symbol { color:var(--night-soft); }
  .nav-search-footer>.nav-search-contact,.nav-result-copy>.discovery-result-action { color:var(--night-link); }
  .nav-search-directory a[aria-current],.nav-search-directory :is(.browse-primary,.browse-secondary)>a:hover,
  .nav-search-directory .browse-phone:hover,.site-header-shared .nav-search-result:hover,
  .nav-search-result:focus-visible,.nav-search-footer>.nav-search-contact:hover,
  .nav-search-footer>.nav-search-contact:focus-visible,.discovery-clear:hover {
    background:#ffffff0b;color:var(--night-ink);
  }
  .discovery-read,.discovery-choices>button,.discovery-reset,.site-secondary,
  .notebook-topic select,.ecosystem-choices>a,.site-region-art span {
    background:var(--night-surface);color:var(--night-ink);border-color:var(--night-line);
  }
  .discovery-read:hover,.discovery-choices>button:hover,.discovery-reset:hover,
  .discovery-feature:hover,.recovery-card:hover,.site-search-result:hover,
  .directory-search:focus-within,.ecosystem-choices>a:hover {
    background:var(--night-raised);border-color:#6f819e;
  }
  .fx-finder { background:linear-gradient(125deg,#1a263bea,#26283ce8);color:var(--night-ink);border-color:#52617b;box-shadow:0 18px 50px #00000020; }
  .fx-examples,.fx-count { color:var(--night-muted); }
  .fx-suggestion,.fx-pause,.fx-scroll-prev,.fx-scroll-next { background:#29364cb0;color:var(--night-ink);border-color:#52617b; }
  .fx-suggestion:hover { background:#35425a; }
  .fx-suggestion svg { color:#cab3e4; }
  .site-search-field input,.site-global-search input,.site-form input,.site-form textarea,.site-form select {
    color:var(--night-ink);background:var(--night-canvas);border-color:#61728c;
  }
  .site-search-field input::placeholder,.site-form input::placeholder,.site-form textarea::placeholder { color:var(--night-soft);opacity:1; }
  .site-form select option,.notebook-topic select option { background:var(--night-surface);color:var(--night-ink); }
  .nav-search-form:focus-within,.fx-search-row:focus-within,.recovery-search>div:focus-within,
  .site-header-shared.search-open .nav-search-form:focus-within,
  .nav-search-form:has(input:focus-visible),.fx-search-row:has(input:focus-visible) {
    border-color:var(--night-focus);box-shadow:0 0 0 3px #e5b58d22;
  }
  input:-webkit-autofill { -webkit-text-fill-color:var(--night-ink);-webkit-box-shadow:0 0 0 100px #162033 inset;caret-color:var(--night-ink); }

  /* Service colors stay distinct, with a more visible selected surface. */
  #explore .service-selector { --service-accent:#adc4ff;--service-tint:#293750; }
  #explore .service-selector[data-selection=fix] { --service-accent:#ffad83;--service-tint:#423028; }
  #explore .service-selector[data-selection=connect] { --service-accent:#89c7f3;--service-tint:#233b50; }
  #explore .service-selector[data-selection=light] { --service-accent:#eac781;--service-tint:#403827; }
  #explore .fx-filterrow { background:#192334d9;border-color:var(--night-line);box-shadow:inset 0 1px 0 #ffffff05; }
  #explore .fx-filterrow .fx-filter { --category-ink:#adc4ff;--category-wash:#2a3750;color:var(--category-ink); }
  #explore .fx-filter[data-filter=fix] { --category-ink:#ffad83;--category-wash:#49332e; }
  #explore .fx-filter[data-filter=connect] { --category-ink:#89c7f3;--category-wash:#243d52; }
  #explore .fx-filter[data-filter=light] { --category-ink:#eac781;--category-wash:#443c2a; }
  #explore .fx-filterrow .fx-filter[aria-pressed=true],#explore .fx-filterrow .fx-filter:hover {
    background:var(--category-wash);border-color:#71819a;box-shadow:inset 0 1px 0 #ffffff0a;
  }
  #explore .service-category-title { color:var(--night-ink); }
  /* Preserve the original category lettering while adapting its ink to navy. */
  #explore [data-filter=fix] .service-wordmark img { filter:brightness(1.25) saturate(.85); }
  #explore [data-filter=connect] .service-wordmark img { filter:brightness(0) saturate(100%) invert(78%) sepia(29%) saturate(805%) hue-rotate(177deg); }
  #explore [data-filter=light] .service-wordmark img { filter:brightness(0) saturate(100%) invert(87%) sepia(28%) saturate(610%) hue-rotate(342deg); }
  #explore .service-category-copy small,#explore .service-response,#explore .fx-count { color:var(--night-muted); }
  .site-tabs button,.work-filters button { color:var(--night-muted); }
  .site-tabs button[aria-pressed=true],.work-filters button[aria-pressed=true],.work-filters button:hover {
    background:var(--night-raised);color:var(--night-ink);border-color:var(--night-line);box-shadow:none;
  }
  .site-tabs button[data-category=fix] { color:#ffad83; }
  .site-tabs button[data-category=connect] { color:#89c7f3; }
  .site-tabs button[data-category=light] { color:#eac781; }
  .site-card-action b,.fx-result>b>span,.recovery-arrow { background:#293b58;color:var(--night-link);border-color:var(--night-line); }
  .service-lane-symbol,.service-lane[data-directory-group=fix] .service-lane-symbol,
  .service-lane[data-directory-group=light] .service-lane-symbol,.service-menu-item>.fx-icon,
  .service-question-mark>.fx-icon,.notebook-entry-symbol { color:#b1bfd6; }
  .service-menu-item:hover,.service-menu-item:focus-visible,.content-link-list>a:hover,
  .content-guide-outline nav a:hover,.recovery-person a:hover,.discovery-fallback-links a:hover {
    background:#ffffff09;color:var(--night-link);
  }
  .notebook-feature { background:var(--night-surface);color:var(--night-ink); }
  .notebook-feature-photo:after { background:linear-gradient(90deg,#192334 2%,#192334fc 30%,#192334e8 43%,#19233457 67%,#19233410); }
  .work-view { background:var(--night-glass);color:var(--night-ink);border-color:var(--night-line); }
  .work-featured .work-caption { color:#fff; }
  .work-featured .work-caption p { color:#edf1f7; }
  .work-featured .work-category { color:#d9e0e9; }

  /* Licenses remain legible both on the hero photograph and in the sheet. */
  .fx-hero-composition .fx-credential summary,.fx-hero-composition .fx-credential-panel,
  .credential-sheet,.confidence-license-card,.about-portrait-label,.confidence-process figcaption {
    background:var(--night-glass);color:var(--night-ink);border-color:#61728c;box-shadow:0 8px 25px #00000025;
  }
  .fx-hero-composition .fx-credential-label .fx-credential-number,
  .confidence-license-card strong { color:var(--night-ink); }
  .fx-hero-composition .fx-credential-label small,.fx-trust-list span,.fx-trust-eyebrow,
  .about-portrait-label small,.confidence-license-card small,.confidence-process figcaption small { color:var(--night-muted); }
  .fx-hero-composition .fx-credential summary>svg:first-child,.fx-hero-composition .fx-credential-chevron,
  .confidence-license-card>svg,.about-portrait-label>.fx-icon { color:#b0c4e1; }
  .credential-sheet .fx-credential-panel { color:var(--night-ink);background:none; }
  .credential-sheet::backdrop,dialog.fx-detail::backdrop { background:#060b17a3; }
  .credential-sheet .fx-trust-more,.fx-hero-composition .fx-credential-panel .fx-trust-more,
  .credential-sheet-close,.credential-sheet-close:hover,.fx-detail button,.fx-inline-detail>button {
    background:var(--night-raised);color:var(--night-link);border-color:var(--night-line);
  }
  .tone-fix,[data-tone=fix] { --accent:#ffad83;--tint:#423028;--soft:#2a2426;--tone-line:#695047; }
  .tone-connect,[data-tone=connect],.tone-blue { --accent:#89c7f3;--tint:#233b50;--soft:#1a2c3e;--tone-line:#426180; }
  .tone-light,[data-tone=light] { --accent:#eac781;--tint:#403827;--soft:#2b2a24;--tone-line:#6b5d41; }
  .tone-personal,[data-tone=personal] { --accent:#d5afea;--tint:#382e47;--soft:#292435;--tone-line:#695677; }
  .visual-icon,.hero-topic-graphic,.confidence-pills>span,.confidence-pills>span:nth-child(2),
  .confidence-pills>span:nth-child(3) { color:var(--night-muted); }
  .about-expertise>span,.credential-scope>span,.credential-note { background:var(--night-raised);color:var(--night-muted);border-color:var(--night-line); }
  .experience-network,.site-region-art { background:radial-gradient(ellipse at 50% 40%,#35415e80,transparent 65%),#192738;color:#bdcde7;border-color:var(--night-line); }
  .network-center,.network-node,.node-wifi,.node-light,.confidence-emblem { background:#25364b;color:#ccd8e8;border-color:var(--night-line); }
  .network-caption,.site-region-art small { color:var(--night-muted); }
  #fx-home>.fx-reviews { background:linear-gradient(128deg,#1b2a40,#27354a);border-color:var(--night-line); }
  .fx-related-review .fx-review-card { background:var(--night-surface); }

  /* Footer, privacy controls and subtle utility links share the same palette. */
  .site-footer { background:radial-gradient(ellipse at 85% 100%,#302b4140,transparent 65%),var(--night-canvas);color:var(--night-ink);border-color:var(--night-line); }
  .site-footer .footer-invitation h2,.site-footer .footer-trust-heading h2 { color:var(--night-ink); }
  .site-footer .footer-eyebrow,.site-footer .footer-invite-text,.site-footer .footer-brand>p,
  .site-footer .footer-region,.site-footer .footer-directory h3,.site-footer .footer-stay-connected>p,
  .site-footer .footer-bottom a,.footer-bottom,.site-footer .footer-trust-heading p,
  .footer-trust-facts small,.site-footer .footer-utilities a,.footer-person small,
  .analytics-choice p,.site-footer .analytics-choice p { color:var(--night-muted); }
  .site-footer .footer-phone,.site-footer .footer-social>a,.site-footer .footer-trust-heading>a,
  .site-footer .footer-trust-facts>a,.site-footer .analytics-choice p a { color:var(--night-link); }
  .site-footer .footer-person,.site-footer .footer-person:hover {
    background:var(--night-glass);color:var(--night-ink);border-color:#586983;box-shadow:none;
  }
  .site-footer .footer-social>a,.site-footer .footer-trust-heading>a,
  .site-footer .footer-trust-facts>a,.footer-trust-heading>.visual-icon { background:#223047aa;border-color:var(--night-line); }
  .site-footer .footer-link-group>a:hover,.site-footer .footer-social>a:hover,
  .site-footer .footer-trust-heading>a:hover,.site-footer .footer-trust-facts>a:hover,
  .site-footer .footer-bottom a:hover,.footer-phone:hover { background:var(--night-raised);color:#d1deff; }
  .footer-region svg,.footer-email svg,.footer-person>svg,.footer-trust-facts>a>svg { color:var(--night-soft); }
  .analytics-choice,.analytics-buttons button { color:var(--night-ink);border-color:var(--night-line); }
  .analytics-buttons button:hover,.analytics-buttons button[aria-pressed=true] { background:#2e3d56; }

  /* Existing light borders and inset highlights soften across every template. */
  .site-section,.site-split,.site-card,.site-quote,.site-faq details,.site-article section,
  .site-article-aside>a,.site-credential-grid article,.site-form,.site-cta,.fx-result,
  .fx-owner,.fx-related-review,.fx-trust-list li,.content-link-list>a,.content-answer,.content-checklist,
  .content-service-region,.content-byline,.content-project-notes,.content-local-places,
  .content-home-library,.content-home-links a,.content-comparison-grid>section,
  .content-guide-outline,.site-information section,.experience-card,.personal-process,
  .footer-bottom,.footer-utilities,.analytics-choice,.analytics-buttons button,
  .site-header-shared .nav-search-footer,.browse-actions,.nav-search-directory .browse-secondary,
  .discovery-refinements,.discovery-reading,.discovery-read,.discovery-feature,
  .recovery-person,.recovery-card,.directory-search,.notebook-topic select,
  .notebook-masthead,.notebook-entry,.notebook-help,.service-lane,.service-menu-item,
  .service-not-sure,.work-entry,.work-next { border-color:var(--night-line); }
  @media(max-width:700px) {
    .notebook-feature-photo:after { background:linear-gradient(180deg,#192334 0%,#192334e8 20%,#19233435 67%,transparent); }
  }
  @media(prefers-reduced-transparency:reduce) {
    .discovery-backdrop { background:var(--night-canvas); }
    .fx-finder,.credential-sheet,.fx-hero-composition .fx-credential summary,
    .site-header-shared.search-open .nav-search-form { background:var(--night-surface); }
  }
}
