/* Brand greens and golds stay in the original stylesheet. These tokens are
   neutral surfaces and reading colors only; the default appearance is light. */
.theme-toggle {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 44px;
  width:44px;
  height:44px;
  min-height:44px;
  margin-left:auto;
  padding:10px;
  border:1px solid var(--line);
  border-radius:50%;
  background:transparent;
  color:var(--ink);
}

.theme-toggle__icon {
  display:block;
  width:22px;
  height:22px;
  flex:0 0 22px;
  border:1px solid currentColor;
  border-radius:50%;
  background:linear-gradient(90deg,#fffdf8 0 50%,#211b1a 50% 100%);
}

.theme-toggle:hover {
  box-shadow:0 0 0 1px currentColor;
}

.site-header > .theme-toggle + .header-contact {
  margin-left:0;
}

html[data-theme="dark"] {
  color-scheme:dark;
  --theme-background:#211b1a;
  --theme-surface:#2c2826;
  --theme-surface-raised:#38322e;
  --theme-field:#242120;
  --theme-text:#f5f0e9;
  --theme-muted:#cec5bc;
  --theme-border:#82766c;
  --theme-divider:#5d534d;
  --theme-error:#f2aca0;
  --theme-brand-surface:#aaa49e;
}

html[data-theme="dark"] body {
  background:var(--theme-background);
  color:var(--theme-text);
}

html[data-theme="dark"] .theme-toggle {
  color:var(--theme-text);
  border-color:var(--theme-border);
}

html[data-theme="dark"] :focus-visible {
  outline-color:var(--theme-text);
}

/* Neutral logo lettering and outlines follow the same foreground as the header
   controls. The inline compass keeps its original colored interior fills. */
html[data-theme="dark"] .brand {
  color:var(--theme-text);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .opportunity-nav,
html[data-theme="dark"] .steps li,
html[data-theme="dark"] .situation-list li,
html[data-theme="dark"] .careers-group,
html[data-theme="dark"] .footer-bottom,
html[data-theme="dark"] .contact-details a {
  border-color:var(--theme-divider);
}

html[data-theme="dark"] .opportunity-nav li + li::before {
  background:var(--theme-divider);
}

html[data-theme="dark"] .text-link,
html[data-theme="dark"] .text-link:hover,
html[data-theme="dark"] .opportunity-nav a,
html[data-theme="dark"] .opportunity-nav button,
html[data-theme="dark"] .situations-followup a,
html[data-theme="dark"] .form-reassurance strong,
html[data-theme="dark"] .careers-page .careers-role,
html[data-theme="dark"] .careers-group > legend,
html[data-theme="dark"] .careers-page label,
html[data-theme="dark"] .careers-page .careers-label,
html[data-theme="dark"] .careers-experience > legend,
html[data-theme="dark"] .careers-page .careers-success p {
  color:var(--theme-text);
}

html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .hero-description,
html[data-theme="dark"] .reassurance,
html[data-theme="dark"] .compass-north,
html[data-theme="dark"] .compass-south,
html[data-theme="dark"] .compass-east,
html[data-theme="dark"] .compass-west,
html[data-theme="dark"] .art-caption,
html[data-theme="dark"] .location-strip p > span:last-child,
html[data-theme="dark"] .section-heading > p,
html[data-theme="dark"] .section-subtitle,
html[data-theme="dark"] .steps p,
html[data-theme="dark"] .situations-intro > p:not(.eyebrow),
html[data-theme="dark"] .situations-followup,
html[data-theme="dark"] .about-copy > p:not(.eyebrow),
html[data-theme="dark"] .property-intro > p:not(.eyebrow),
html[data-theme="dark"] .form-reassurance p,
html[data-theme="dark"] .prefer-call > p,
html[data-theme="dark"] .form-guidance,
html[data-theme="dark"] .optional,
html[data-theme="dark"] .form-privacy,
html[data-theme="dark"] .form-status,
html[data-theme="dark"] .contact-details p > span,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .legal-content p,
html[data-theme="dark"] .legal-content li,
html[data-theme="dark"] .careers-page .careers-subheading {
  color:var(--theme-muted);
}

html[data-theme="dark"] .feature-notice,
html[data-theme="dark"] .situations,
html[data-theme="dark"] .form-panel,
html[data-theme="dark"] .careers-application,
html[data-theme="dark"] .site-footer {
  background:var(--theme-surface);
  border-color:var(--theme-divider);
}

html[data-theme="dark"] .feature-notice {
  color:var(--theme-muted);
  border-left-color:var(--sage);
}

html[data-theme="dark"] .property-section,
html[data-theme="dark"] .location-strip {
  background:var(--theme-field);
  border-color:var(--theme-divider);
}

html[data-theme="dark"] .step-number,
html[data-theme="dark"] .form-reassurance,
html[data-theme="dark"] .success-mark,
html[data-theme="dark"] .art-caption span + span {
  border-color:var(--theme-border);
}

html[data-theme="dark"] .situation-list span {
  color:var(--theme-muted);
}

/* The green feature section, gold highlights and button fills are not recolored. */
html[data-theme="dark"] .why .eyebrow {
  color:#c6cdbb;
}

html[data-theme="dark"] .button {
  color:var(--paper);
  box-shadow:0 0 0 1px var(--theme-border);
}

html[data-theme="dark"] .founder-portrait {
  background:var(--theme-surface);
  border-color:var(--theme-divider);
}

html[data-theme="dark"] .founder-portrait figcaption {
  background:var(--theme-surface-raised);
  border-color:var(--theme-divider);
}

html[data-theme="dark"] .founder-art > img {
  background:var(--theme-brand-surface);
  border-radius:50%;
  box-shadow:0 0 0 10px var(--theme-brand-surface);
  opacity:1;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .careers-page select {
  color:var(--theme-text);
  background:var(--theme-field);
  border-color:var(--theme-border);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color:var(--theme-muted);
}

html[data-theme="dark"] input:disabled,
html[data-theme="dark"] textarea:disabled,
html[data-theme="dark"] .careers-page select:disabled {
  color:var(--theme-muted);
  background:var(--theme-surface-raised);
  opacity:1;
  -webkit-text-fill-color:var(--theme-muted);
}

html[data-theme="dark"] .careers-page input[type="file"]::file-selector-button {
  color:var(--theme-text);
  background:var(--theme-surface-raised);
  border-color:var(--theme-border);
}

html[data-theme="dark"] .careers-page .careers-status {
  color:var(--theme-text);
  background:var(--theme-surface-raised);
}

html[data-theme="dark"] .field-error,
html[data-theme="dark"] .form-status.is-error,
html[data-theme="dark"] .careers-page .field-error,
html[data-theme="dark"] .careers-page .careers-status.is-error {
  color:var(--theme-error);
}

html[data-theme="dark"] [aria-invalid="true"],
html[data-theme="dark"] .careers-page [aria-invalid="true"],
html[data-theme="dark"] .careers-page .careers-status.is-error {
  border-color:var(--theme-error);
}

/* Match the published photo treatment: contrast stays behind the copy,
   while the photograph keeps its original lighting in both themes. */
html[data-theme="dark"] .hero-photo { background:var(--theme-background); }
html[data-theme="dark"] .hero-background .hero-copy {
  background:rgb(33 27 26 / 94%);
  color:var(--theme-text);
}
@media (max-width:600px) {
  .site-header { flex-wrap:wrap; }
  .site-header > .theme-toggle + .header-contact { margin-left:auto; }
}

@media (forced-colors:active) {
  .theme-toggle__icon {
    forced-color-adjust:none;
  }
}
