.sif-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin-block-start: 8px;
  padding: 8px;
  border: 1px solid var(--line, #252d2938);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.sif-theme-toggle:hover { background: var(--tint, #dfe8de); }
.sif-theme-switch {
  display: flex;
  align-items: center;
  flex: none;
  width: 34px;
  height: 20px;
  padding: 3px;
  border-radius: 20px;
  background: #637569;
}
.sif-theme-switch::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
}
.sif-theme-toggle[aria-pressed="true"] .sif-theme-switch {
  justify-content: end;
  background: #43745d;
}
.sif-page-menu.sif-legal-menu { margin-block: 0 12px; }
.sif-page-menu.sif-legal-menu .sif-menu-panel { inset-block: calc(100% + 8px) auto; }

html[data-sif-theme="dark"] {
  color-scheme: dark;
  --night-paper: #121b17;
  --night-surface: #1b2922;
  --night-field: #16221c;
  --night-tint: #293d32;
  --night-text: #eef3eb;
  --night-muted: #b9c9bd;
  --night-accent: #a8d5b7;
  --night-line: #51695a;
  --paper: var(--night-paper);
  --surface: var(--night-surface);
  --ink: var(--night-text);
  --muted: var(--night-muted);
  --line: var(--night-line);
  --accent: var(--night-accent);
  --tint: var(--night-tint);
  --action: #3b654f;
  --action-hover: #325742;
  --action-pressed: #334e3d;
  --showcase-bg: var(--night-surface);
  --showcase-accent: var(--night-accent);
  --brief-paper: var(--paper);
  --brief-ink: var(--ink);
  --brief-muted: var(--muted);
  --brief-line: var(--line);
  --brief-action: var(--action);
}
[data-sif-theme="dark"] body { background: var(--paper); color: var(--ink); }
[data-sif-theme="dark"] :focus-visible { outline-color: var(--accent); }
[data-sif-theme="dark"] ::selection { background: #3d5b48; color: var(--ink); }

[data-sif-theme="dark"] :is(.site-header, .skip, .sif-menu-panel, .header-tools-panel, .client-panel) {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
[data-sif-theme="dark"] .sif-page-menu { color: var(--ink); }
[data-sif-theme="dark"] :is(.site-header .header-login, .site-header .header-actions .sif-page-menu > summary, .sif-page-menu > summary) {
  background: var(--night-field);
  border-color: var(--line);
  color: var(--ink);
}
[data-sif-theme="dark"] .sif-page-menu[open] > summary { background: var(--tint); }
[data-sif-theme="dark"] :is(.sif-menu-panel > :is(.language, .legal-language, .brief-language), .sif-page-menu .sif-share-actions > :is(a, button)) {
  background: var(--tint);
  color: var(--ink);
}
[data-sif-theme="dark"] .sif-menu-panel [data-language][aria-pressed="true"] {
  background: var(--action);
  border-color: var(--action);
  color: white;
}
[data-sif-theme="dark"] .demo-language button[aria-pressed="true"] { background: var(--action); color: white; }
[data-sif-theme="dark"] :is(.header-mark img, .brand[src], .order-brand img, .footer-brand-row img) { filter: brightness(0) invert(.94); }

[data-sif-theme="dark"] :is(.journey, .room-grid, .invitation) { background: var(--night-field); }
[data-sif-theme="dark"] .card { background: var(--surface); }
[data-sif-theme="dark"] :is(.service-feature:nth-child(2), .service-feature:last-child, .process-visual, .footer-socials a, .simulation) {
  background: var(--tint);
  color: var(--ink);
}
[data-sif-theme="dark"] :is(.feature-icon, .service-feature:last-child .feature-icon, .materials-step, .materials-deliverables svg, .materials-plan-open svg, .home-projects .project-demo-link) {
  color: var(--accent);
}
[data-sif-theme="dark"] :is(.project-demo-link, .process-check) { background: var(--action); color: white; }
[data-sif-theme="dark"] .home-projects .project-demo-link { background: transparent; }
[data-sif-theme="dark"] :is(.client-main, .offers) { background: var(--paper); }
[data-sif-theme="dark"] :is(.contact-form :is(input, textarea), .client-panel input, .sif-share-url, #property-share-url, .top ~ main select) {
  color-scheme: dark;
  background: var(--night-field);
  color: var(--ink);
  border-color: var(--line);
}
[data-sif-theme="dark"] :is(input, textarea)::placeholder { color: var(--muted); }
[data-sif-theme="dark"] .plan-frame { background: var(--surface); }
[data-sif-theme="dark"] .plan-frame img { background: white; }
[data-sif-theme="dark"] .plan-room span { color: #305653; }
[data-sif-theme="dark"] .plan-room:is(:hover, :focus-visible) span { background: var(--action); color: white; }
[data-sif-theme="dark"] .enquiry-actions :is(button, a) { background: #25392e; color: var(--ink); }
[data-sif-theme="dark"] .enquiry-actions :is(button, a):hover { background: var(--action); }
[data-sif-theme="dark"] .header-tools-panel button:focus-visible { outline-color: var(--accent); }

[data-sif-theme="dark"][data-order-brand="step-in-first"] .order-page { --ink: var(--night-text); --blue: var(--night-accent); }
[data-sif-theme="dark"][data-order-brand="step-in-first"] body.order-page > header,
[data-sif-theme="dark"] .order-page :is(#brief-form, #receipt, .order-summary, .steps ol, .package-options label > span, .upload-zone, .intake-preview-note, .local-notice, .scope-note, .file-uploader, .uploader-drop, .file-card, .uploader-file, .file-list button, .uploader-drop > b) {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}
[data-sif-theme="dark"] .order-page :is(.steps li[aria-current], .package-options input:checked + span, .package-options b .launch-label, #selected-demo:hover) {
  background: var(--tint);
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: none;
}
[data-sif-theme="dark"] .order-page .package-options input { background: var(--night-field); border: 1px solid var(--line); box-shadow: none; }
[data-sif-theme="dark"] .order-page .package-options input:checked { background: var(--action); border-color: var(--accent); }
[data-sif-theme="dark"] .order-page .package-options :is(strong, .launch-value) { color: var(--ink); }
[data-sif-theme="dark"] .order-page :is(.intro > p:last-child, .steps li:not([aria-current]), .package-options :is(em, small, del), #selected-description, .field-note, .save-note) { color: var(--muted); }
[data-sif-theme="dark"] .order-page :is(.uploader-note, .uploader-drop > span) { color: var(--muted); }
[data-sif-theme="dark"] .order-page .uploader-drop > svg { color: var(--accent); }
[data-sif-theme="dark"] .order-page .has-reflective-material { background: var(--surface) !important; }
[data-sif-theme="dark"] .order-page .package-options input:checked + .has-reflective-material { background: var(--tint) !important; }
[data-sif-theme="dark"] .order-page .reflective-material { display: none; }
[data-sif-theme="dark"] .order-page #form-error { background: #412824; color: #ffdbd5; border-color: #a26c62; }
[data-sif-theme="dark"] .order-page :is(input:not([type=radio]):not([type=checkbox]), select, textarea),
[data-sif-theme="dark"] .order-page input::file-selector-button {
  background: var(--night-field);
  color: var(--ink);
  border-color: var(--line);
}
[data-sif-theme="dark"] .order-page :is(.card-ray, .card-lines, .card-dot) { display: none; }
[data-sif-theme="dark"] .order-page .form-actions :is(#next, #submit):enabled:is(:hover, :active) {
  background: var(--action-hover) !important;
  border-color: var(--accent) !important;
}

[data-sif-theme="dark"] .badge { background: #315440; }
[data-sif-theme="dark"] .badge[data-state="failed"] { background: #623e33; }
[data-sif-theme="dark"] .badge[data-state="pending"] { background: #5a4c2e; }
[data-sif-theme="dark"] .actions .primary { background: var(--action); border-color: var(--action); }
