/ 1. User explicitly chose dark mode in the past OR
        // 2. No stored preference AND site default is dark
        html.classList.add('dark-mode');
      } else if (storedTheme === 'light' || (!storedTheme && !siteDefaultDark)) {
        // Apply light mode if:
        // 1. User explicitly chose light mode in the past OR
        // 2. No stored preference AND site default is light
        html.classList.remove('dark-mode');
      }
    }
  </script>
</head>

<body class="{% if page.layout %}layout-{{ 