/* Monte Sião preserves the navy identity in both themes. Drawings retain
   their original light canvas and status colours for reliable interpretation. */
:root[data-tema=claro] {color-scheme:light}
:root[data-tema=escuro] {
  color-scheme:dark;--ink:#ecf2fa;--muted:#b4c4d5;--line:#34485e;
  --paper:#09182a;--soft:#10243a;--ms-accent:#a9cfff;
}
.ms-theme-toggle {
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:44px;min-width:44px;padding:9px 12px;border:1px solid var(--line);
  border-radius:8px;background:var(--soft);color:var(--ink);font-size:12px;
  white-space:nowrap;flex-shrink:0;touch-action:manipulation;
}
.ms-theme-toggle {box-sizing:border-box;position:relative;overflow:hidden;line-height:1.2}
.ms-theme-toggle .ms-theme-icon {display:block;width:20px;height:20px;flex:0 0 20px;pointer-events:none}
.ms-page .header-actions {gap:16px}
.ms-page .site-header {gap:22px}
html[data-tema=escuro] .ms-page {background:var(--paper);color:var(--ink)}
html[data-tema=escuro] .ms-page .site-header {background:#09182af2;border-color:var(--line)}
html[data-tema=escuro] .ms-page :is(.brand img,.footer-brand img) {content:url('/assets/img/monte-siao/logo-horizontal-branca.svg')}
html[data-tema=escuro] .ms-page :is(.mh-section,.ms-purchase,.residences) {background:var(--soft)}
html[data-tema=escuro] .ms-page :is(.mh-form,.mh-results,.ms-summary,.ms-checkout-dialog,.lot-panel) {background:var(--paper);border-color:var(--line);color:var(--ink)}
html[data-tema=escuro] .ms-page :is(.eyebrow:not(.light),.text-link:not(.light),.mh-note a,.mh-source-links a,.mh-email,.mh-bottom-note summary,.mh-emphasis dd,.ms-text-button,.ms-rate,.ms-totals dd,.ms-review-description,.ms-review-totals dd,.ms-protocol strong,.ms-choices small,.ms-schedule>summary,.ms-data-use>summary) {color:var(--ms-accent)}
html[data-tema=escuro] .ms-page :is(.lot-kind,.ms-step,.type-number) {color:var(--muted)}
html[data-tema=escuro] .ms-page :is(.mh-field input,.mh-field select,.ms-field input,.ms-field select,.lot-panel select,.ms-code-row input) {
  background:#10243a;color:var(--ink);border-color:#637991;
}
html[data-tema=escuro] .ms-page :is(.mh-field input,.mh-field select,.ms-field input,.ms-field select):disabled {background:#1b2e43;color:#bdcad8}
html[data-tema=escuro] .ms-page :is(input::placeholder,textarea::placeholder) {color:#a2b4c9;opacity:1}
html[data-tema=escuro] .ms-page :is(.mh-lines>label,.ms-choices>label,.gallery-filters button) {background:var(--paper);border-color:#637991;color:var(--ink)}
html[data-tema=escuro] .ms-page :is(.mh-lines>label,.ms-choices>label):has(input:checked) {background:#193c61;border-color:var(--ms-accent);box-shadow:inset 0 0 0 1px var(--ms-accent)}
html[data-tema=escuro] .ms-page :is(.mh-lines input,.mh-check input,.ms-choices input,.ms-check>input) {accent-color:var(--ms-accent)}
html[data-tema=escuro] .ms-page :is(.mh-rate-summary,.mh-quota,.ms-review-totals,.ms-protocol) {background:#152e48;color:var(--ink)}
html[data-tema=escuro] .ms-page :is(.mh-table-scroll th,.ms-table-scroll th) {background:#19364f;color:var(--ink)}
html[data-tema=escuro] .ms-page :is(.mh-totals>div,.mh-table-scroll td,.mh-table-scroll th,.ms-table-scroll td,.ms-table-scroll th,.ms-schedule,.ms-checkout-dialog form,.ms-totals .ms-total,.ms-totals .ms-main-amount,.home-type) {border-color:var(--line)}
html[data-tema=escuro] .ms-page :is(.ms-status[data-tone=error],.mh-status[data-error=true]) {color:#ffb8ae}
html[data-tema=escuro] .ms-page :is(.button.navy,.gallery-filters button[aria-pressed=true]) {background:#a9cfff;border-color:#a9cfff;color:#062849}
html[data-tema=escuro] .ms-page .button.navy:hover {background:#c9e1ff}
html[data-tema=escuro] .ms-page .header-contact {border-color:#a9cfff;color:#dceaff}
html[data-tema=escuro] .ms-page .header-contact:hover {background:#193c61}
html[data-tema=escuro] .ms-page .ms-dialog-close {background:#10243a;border-color:#637991;color:var(--ink);min-width:44px;min-height:44px}
html[data-tema=escuro] .ms-page :is(.map-toolbar,.map-legend,.map-gesture-hint) {background:var(--soft);color:var(--muted)}
html[data-tema=escuro] .ms-page .map-art {color-scheme:light;background:#f8fafc}
html[data-tema=escuro] .ms-page .zoom-controls button {background:#152e48;border-color:#637991;color:var(--ink)}
html[data-tema=escuro] .ms-page .zoom-controls button:hover:not(:disabled) {background:#264a70}
html[data-tema=escuro] .ms-page .gallery-image {background:#132c45}
html[data-tema=escuro] .ms-page .gallery-expand {background:#123250ed;color:#fff}
html[data-tema=escuro] .ms-page :is(a,button,input,select,summary):focus-visible {outline-color:#f2cf86}
@media(max-width:1280px) {
  .ms-page .main-nav {display:none}
}
@media(max-width:760px) {
  .ms-page .header-actions {gap:10px}
  .ms-page .ms-theme-label {display:none}
  .ms-page .ms-theme-toggle {width:44px;padding:8px}
}
/* The platform return belongs to its own row and remains reachable while
   exploring the page; it no longer competes with client and theme controls. */
:root {--ms-platform-height:44px;--ms-header-height:88px;scroll-padding-top:calc(var(--ms-platform-height) + var(--ms-header-height) + 16px + env(safe-area-inset-top,0px))}
.ms-platform-bar {position:sticky;top:0;z-index:22;box-sizing:border-box;height:calc(var(--ms-platform-height) + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) max(28px,calc((100vw - 1280px)/2)) 0;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#082e28;color:#f3f8f5;box-shadow:inset 0 -1px 0 #3a5b4b}
.ms-platform-bar .header-urbannix {display:inline-flex;align-items:center;gap:10px;min-height:44px;min-width:44px;margin:0;font-size:12px;font-weight:600;white-space:nowrap;touch-action:manipulation}
.ms-platform-bar .header-urbannix>span[aria-hidden] {font-size:20px;line-height:1}
.ms-platform-name {font-size:12px;font-weight:700;letter-spacing:.07em;opacity:.85}
.ms-page .site-header {top:calc(var(--ms-platform-height) + env(safe-area-inset-top,0px));height:var(--ms-header-height);padding-inline:max(28px,calc((100vw - 1280px)/2))}
.ms-page .main-nav {gap:20px;font-size:12px}
.ms-page .header-actions {display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:16px;min-width:0}
.ms-page .header-client {display:inline-flex;align-items:center;min-height:44px;min-width:0;white-space:nowrap}
.ms-page .ms-theme-toggle {order:3;min-width:44px;min-height:44px;flex-shrink:0}
html[data-tema=escuro] .ms-platform-bar {background:#061e1a;box-shadow:inset 0 -1px 0 #2e5244}
@media(max-width:760px) {
  :root {--ms-header-height:72px}
  .ms-platform-bar {padding-inline:20px}
  .ms-page .site-header {padding-inline:20px}
  .ms-page .brand img {width:166px}
  .ms-page .header-actions {gap:10px}
}
@media(max-width:530px) {
  :root {--ms-header-height:68px}
  .ms-platform-bar {padding-inline:16px}
  .ms-platform-name {font-size:11px}
  .ms-page .site-header {padding-inline:16px;gap:12px}
  .ms-page .brand img {width:132px}
  .ms-page .header-actions {gap:10px}
  .ms-page .header-client {font-size:11px;text-decoration-thickness:1px;text-underline-offset:4px}
  .ms-page .ms-theme-toggle {width:44px;height:44px;padding:0}
}
@media(max-width:370px) {
  .ms-page .brand img {width:112px}
  .ms-page .site-header {padding-inline:12px;gap:8px}
  .ms-page .header-actions {gap:8px}
  .ms-page .header-client {font-size:10px}
}

/* One compact WhatsApp control, with the supplied mascot in its original
   proportions. Installation help and modal dialogs keep their own space. */
.ms-whatsapp {position:fixed;right:max(16px,env(safe-area-inset-right,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px) + var(--ms-wa-offset,0px));z-index:925;display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:52px;padding:0 14px 0 4px;border:1px solid #247548;border-radius:999px;background:#086639;color:#fff;font-family:inherit;font-size:12px;font-weight:600;line-height:1.2;text-decoration:none;box-shadow:0 5px 20px #071b2b30;touch-action:manipulation;transition:transform .18s ease,box-shadow .18s ease}
.ms-whatsapp .ms-whatsapp-mascot {display:block;flex:0 0 58px;width:58px;height:76px;max-width:none;object-fit:contain;align-self:flex-end;margin-top:-24px;pointer-events:none}
.ms-whatsapp .ms-whatsapp-label {display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.ms-whatsapp .ms-whatsapp-label svg {width:16px;height:16px;flex:0 0 16px}
.ms-whatsapp:hover {transform:translateY(-2px);box-shadow:0 8px 24px #071b2b3d}
.ms-whatsapp:focus-visible {outline:3px solid #d2ab62;outline-offset:4px}
.ms-whatsapp.ms-whatsapp-image-fallback .ms-whatsapp-mascot {flex-basis:36px;width:36px;height:36px;margin:0 4px;align-self:center}
.ms-page:has(#ux-pwa-actions:not([hidden])) .ms-whatsapp {--ms-wa-offset:76px}
.ms-page:has(dialog[open]) .ms-whatsapp {visibility:hidden}
@media(max-width:530px) {
  .ms-whatsapp {right:max(12px,env(safe-area-inset-right,0px));padding-right:12px;min-height:48px;font-size:11px;gap:2px}
  .ms-whatsapp .ms-whatsapp-mascot {flex-basis:52px;width:52px;height:68px;margin-top:-20px}
  .ms-whatsapp .ms-whatsapp-label {gap:5px}
}
@media(prefers-reduced-motion:reduce) {.ms-whatsapp {transition:none}.ms-whatsapp:hover {transform:none}}
@media print {.ms-platform-bar,.ms-whatsapp {display:none!important}.ms-page .site-header {position:static}}
