/* Deal Analysis Issues 32–35. Route-only presentation: no math, entitlements or verdict thresholds. */
body.da-standalone {
  --da-content-width:1240px;
}
/* The previous remediation accidentally ended with max-width:100%, overriding the centered shell. */
body.da-standalone > .wrap {
  box-sizing:border-box!important;
  width:calc(100% - 44px)!important;
  max-width:var(--da-content-width)!important;
  min-width:0!important;
  margin-inline:auto!important;
  padding:0!important;
  flex:1 0 auto!important;
}
body.da-standalone .wrap :is(#propertyAnalyzer,#dealAnalysisView,#daDealResults,.da-page-intro) {
  box-sizing:border-box;
  max-width:100%;
  min-width:0;
}
body.da-standalone .da-page-intro {
  margin:0 0 24px!important;
  padding:52px clamp(22px,4vw,53px) 45px!important;
  border:1px solid var(--da-stroke)!important;
  border-radius:0 0 19px 19px!important;
}
/* Same four-link header design, link order and spacing as the approved V5 homepage.
   Full-width header is OUTSIDE the centered .wrap, like the homepage. */
body.da-standalone > .home-nav.da-site-header {
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  min-height:0!important;
  display:flex!important;
  flex-flow:row nowrap!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:24px!important;
  margin:0!important;
  padding:20px max(4%, calc((100% - 1240px)/2))!important;
  border:0!important;
  border-bottom:1px solid #d8e0e5!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
}
body.da-standalone > .home-nav .home-logo {
  display:flex!important;align-items:center!important;gap:10px!important;
  flex:0 0 auto!important;font:700 22px/1.2 "Space Grotesk",Inter,sans-serif!important;
  color:#0f1b2d!important;text-decoration:none!important;white-space:nowrap!important;
}
body.da-standalone > .home-nav .home-logo .site-header-name {
  font:inherit!important;color:inherit!important;text-transform:none!important;
}
body.da-standalone > .home-nav .home-logo img {
  width:43px!important;height:43px!important;object-fit:contain!important;
}
body.da-standalone > .home-nav .da-main-nav {
  display:flex!important;flex:0 1 auto!important;flex-wrap:wrap!important;
  justify-content:flex-start!important;align-items:center!important;
  order:1!important;width:auto!important;min-width:0!important;
  margin:0 0 0 auto!important;padding:0!important;gap:25px!important;
  background:transparent!important;border:0!important;overflow:visible!important;
  font:700 14px/1.4 Inter,Arial,sans-serif!important;
}
body.da-standalone > .home-nav .da-main-nav a {
  display:inline!important;min-height:0!important;padding:0!important;
  border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
  color:#0f1b2d!important;text-decoration:none!important;white-space:nowrap!important;
  font:inherit!important;
}
body.da-standalone > .home-nav .da-main-nav a:hover,
body.da-standalone > .home-nav .da-main-nav a:focus-visible {color:#087967!important;text-decoration:underline!important;}
body.da-standalone > .home-nav :is(.home-language-toggle,.home-theme-toggle) {
  order:2!important;display:inline-flex!important;align-items:center!important;
  justify-content:center!important;flex:0 0 auto!important;
  min-width:0!important;min-height:39px!important;
  gap:8px!important;padding:7px 12px!important;
  border:1px solid #d3e0e5!important;border-radius:9px!important;
  background:#fff!important;color:#0f1b2d!important;
  font:700 13px Inter,Arial,sans-serif!important;
  cursor:pointer!important;position:static!important;transform:none!important;
}
body.da-standalone > .home-nav .home-language-toggle {font-size:12px!important;gap:7px!important;padding-inline:11px!important;}
body.da-standalone > .home-nav .home-language-flag {width:20px!important;height:15px!important;display:block!important;object-fit:cover!important;}
body.da-standalone > .home-nav .home-theme-icon {font-size:17px!important;line-height:1!important;}
html[data-theme="dark"] body.da-standalone > .home-nav.da-site-header {background:#151c1d!important;border-color:#405554!important;}
html[data-theme="dark"] body.da-standalone > .home-nav :is(.home-logo,.da-main-nav a) {color:#edf5f2!important;}
html[data-theme="dark"] body.da-standalone > .home-nav :is(.home-language-toggle,.home-theme-toggle) {
  background:#273233!important;border-color:#405554!important;color:#edf5f2!important;
}
html[data-theme="dark"] body.da-standalone > .home-nav .da-main-nav a:hover {color:#9ce6bf!important;}
/* Preserve the original What's What modal, but move its trigger beside the page CTAs. */
body.da-standalone .da-intro-actions .da-intro-help {
  display:inline-flex;align-items:center;justify-content:center;
  padding:11px 16px;min-height:43px;border:1px solid var(--da-input-border);
  border-radius:10px;background:var(--da-surface);color:var(--da-ink);
  font:700 13px Inter,Arial,sans-serif;cursor:pointer;
}
body.da-standalone .da-intro-actions .da-intro-help:hover {border-color:var(--da-primary);}
/* The prior dark-on-dark rule survived beneath the light-themed verdict panel.
   Keep these selectors higher specificity than BOTH legacy and remediation rules. */
body.da-standalone #dealAnalysisView #daDealResults .deal-verdict-row {
  background:#e6f3ec!important;border:1px solid #a2c2b3!important;color:#15362d!important;
}
body.da-standalone #dealAnalysisView #daDealResults .deal-verdict-primary {
  background:transparent!important;border:0!important;color:#15362d!important;
}
body.da-standalone #dealAnalysisView #daDealResults :is(.deal-verdict-kicker,.deal-verdict-label,.deal-verdict-reason) {
  color:#24483c!important;opacity:1!important;text-shadow:none!important;
}
body.da-standalone #dealAnalysisView #daDealResults #dealVerdict {
  color:#15362d!important;opacity:1!important;text-shadow:none!important;
  background:transparent!important;
}
body.da-standalone #dealAnalysisView #daDealResults #dealVerdict:is(.strong,.excellent-deal) {color:#096340!important;}
body.da-standalone #dealAnalysisView #daDealResults #dealVerdict:is(.workable,.good-deal,.fair-deal) {color:#835100!important;}
body.da-standalone #dealAnalysisView #daDealResults #dealVerdict:is(.weak,.poor-deal) {color:#a12e25!important;}
html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults .deal-verdict-row {
  background:#213d38!important;border-color:#52746a!important;color:#f1faf5!important;
}
html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults .deal-verdict-primary {color:#f1faf5!important;}
html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults :is(.deal-verdict-kicker,.deal-verdict-label,.deal-verdict-reason) {color:#d2e7dd!important;}
html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults #dealVerdict {color:#f1faf5!important;}
html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults #dealVerdict:is(.strong,.excellent-deal) {color:#a4ecc8!important;}
html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults #dealVerdict:is(.workable,.good-deal,.fair-deal) {color:#ffd598!important;}
html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults #dealVerdict:is(.weak,.poor-deal) {color:#ffb5a2!important;}
@media(max-width:850px){
  body.da-standalone > .home-nav.da-site-header {flex-wrap:wrap!important;gap:12px!important;padding:16px 4%!important;}
  body.da-standalone > .home-nav .da-main-nav {order:3!important;flex:1 0 100%!important;width:100%!important;margin-left:0!important;gap:13px 20px!important;overflow:visible!important;}
  body.da-standalone > .home-nav .home-theme-toggle {margin-left:auto!important;}
  body.da-standalone > .wrap {width:calc(100% - 28px)!important;}
  body.da-standalone .da-page-intro {padding:28px 20px!important;}
}
@media(max-width:560px){
  body.da-standalone > .home-nav .home-logo {font-size:17px!important;}
  body.da-standalone > .home-nav .home-logo img {width:36px!important;height:36px!important;}
  body.da-standalone > .home-nav .da-main-nav {gap:11px 17px!important;font-size:12px!important;}
  body.da-standalone > .home-nav .home-theme-toggle .da-theme-label {display:none!important;}
  body.da-standalone > .home-nav :is(.home-language-toggle,.home-theme-toggle) {min-height:36px!important;padding:6px 10px!important;}
  body.da-standalone > .wrap {width:calc(100% - 24px)!important;}
  body.da-standalone .da-intro-actions .da-intro-help {flex:1 1 100%;}
  body.da-standalone #dealAnalysisView #daDealResults .deal-verdict-row {grid-template-columns:minmax(0,1fr)!important;}
}
/* Make the full-bleed footer and its descendants box-sized on narrow screens. */
body.da-standalone {margin:0!important;}
body.da-standalone > .ds-shared-footer {box-sizing:border-box!important;width:100%!important;max-width:100%!important;overflow-wrap:anywhere;}
body.da-standalone #assumableProSection > .pro-lock-overlay {box-sizing:border-box!important;width:100%!important;max-width:100%!important;}
/* Closed modal remains out of layout; the original openWhatsWhat toggles .open. */
body.da-standalone #whatsWhatModal:not(.open) {display:none!important;}
@media (prefers-reduced-motion: reduce) {
  /* Reassert theme appearance independently of animation preferences. */
  html[data-theme="dark"] body.da-standalone > .home-nav.da-site-header {background:#151c1d!important;color:#edf5f2!important;border-color:#405554!important;}
  html[data-theme="dark"] body.da-standalone > .home-nav .home-logo,
  html[data-theme="dark"] body.da-standalone > .home-nav .da-main-nav a {color:#edf5f2!important;}
  html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults .deal-verdict-row {background:#213d38!important;color:#f1faf5!important;border-color:#52746a!important;}
  html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults #dealVerdict {color:#f1faf5!important;}
  html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults :is(.deal-verdict-kicker,.deal-verdict-label,.deal-verdict-reason) {color:#d2e7dd!important;}
}

/* Language button must be content-sized, matching the V5 homepage.
   Legacy .site-header .language-switch used a fixed 44/48px square that clipped the flag + ES/EN. */
body.da-standalone > .home-nav #languageSwitch {
  box-sizing:border-box!important;
  width:auto!important;
  height:auto!important;
  min-width:max-content!important;
  min-height:39px!important;
  padding:7px 11px!important;
  gap:7px!important;
  white-space:nowrap!important;
  flex:0 0 auto!important;
}
body.da-standalone > .home-nav #languageSwitch :is(.home-language-flag,.da-language-label) {
  flex-shrink:0!important;
}
@media (max-width:540px) {
  body.da-standalone > .home-nav #languageSwitch { min-height:36px!important; }
}

/* Mortgage batch issue 3: align the existing Deal Analysis DARK theme with approved
   homepage brown/near-black. Light theme and underlying calculations remain unchanged. */
html[data-theme="dark"]:has(body.da-standalone){background:#16150f!important}
html[data-theme="dark"] body.da-standalone{
  --da-bg:#16150f;--da-surface:#24231c;--da-ink:#f7f4ec;--da-muted:#cbc5b8;
  --da-stroke:#504d40;--da-tint:#302e25;--da-pine:#a4e5c5;
  --da-field:#211f19;--da-field-ink:#f7f4ec;--da-soft-bg:#302e25;
  --da-input-border:#857e6c;--da-table-head:#36352a;--da-table-alt:#2c2b23;
  background:#16150f!important;background-image:none!important;color:#f7f4ec!important;
}
html[data-theme="dark"] body.da-standalone.analyzer-property,
html[data-theme="dark"] body.da-standalone.analyzer-business{background:#16150f!important;background-image:none!important}
html[data-theme="dark"] body.da-standalone > .home-nav.da-site-header{background:#1c1b15!important;border-color:#504d40!important}
html[data-theme="dark"] body.da-standalone > .home-nav :is(.home-language-toggle,.home-theme-toggle){background:#302e25!important;border-color:#504d40!important;color:#f7f4ec!important}
html[data-theme="dark"] body.da-standalone .da-page-intro{background:linear-gradient(115deg,#1f1e17,#25231c 60%,#28251e)!important;border-color:#504d40!important}
html[data-theme="dark"] body.da-standalone .da-intro-aside,
html[data-theme="dark"] body.da-standalone #dealAnalysisView > .card,
html[data-theme="dark"] body.da-standalone #propertyAnalyzer #dealAnalysisView > .card:not(.pro-access-locked){background:#24231c!important;border-color:#504d40!important;color:#f7f4ec!important}
html[data-theme="dark"] body.da-standalone #dealAnalysisView > #daDealResults.verdict{background:#24231c!important;border-color:#504d40!important}
html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults .deal-verdict-row{background:#302e25!important;border-color:#716a57!important;color:#f7f4ec!important}
html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults .deal-verdict-primary{color:#f7f4ec!important}
html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults :is(.deal-verdict-kicker,.deal-verdict-label,.deal-verdict-reason){color:#ddd6c8!important}
html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults #dealVerdict{color:#f7f4ec!important}
html[data-theme="dark"] body.da-standalone #dealAnalysisView :is(.smart-market-panel,.smart-property-search-box,.stress-assumption-grid,.estimate-panel,.savings-panel){background:#302e25!important;border-color:#504d40!important;color:#f7f4ec!important}
html[data-theme="dark"] body.da-standalone #dealAnalysisView :is(input:not([type="checkbox"]),select,textarea):not(.da-required-missing):not([aria-invalid="true"]){background:#211f19!important;color:#f7f4ec!important;border-color:#857e6c!important}
html[data-theme="dark"] body.da-standalone .da-floating-verdict{background:#24231c!important;border-color:#504d40!important;color:#f7f4ec!important}
html[data-theme="dark"] body.da-standalone .ds-shared-footer,
html[data-theme="dark"] body.da-standalone > .ds-shared-footer{background:#1c1b15!important;border-color:#504d40!important}
/* Issue 4: override both the legacy light mint link and its inherited white text.
   Explicitly style the actual anchor in its header nav; no generic link rules. */
html[data-theme="dark"] body.da-standalone > .home-nav .da-main-nav a.account-signin-link{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  background:#c4edd9!important;background-image:none!important;color:#142921!important;
  -webkit-text-fill-color:#142921!important;border:1px solid #c4edd9!important;
  border-radius:9px!important;padding:8px 13px!important;box-shadow:none!important;
  text-decoration:none!important;opacity:1!important;
}
html[data-theme="dark"] body.da-standalone > .home-nav .da-main-nav a.account-signin-link:hover,
html[data-theme="dark"] body.da-standalone > .home-nav .da-main-nav a.account-signin-link:focus-visible{
  background:#e4f8ed!important;color:#10251c!important;-webkit-text-fill-color:#10251c!important;
  border-color:#e4f8ed!important;
}
@media(prefers-reduced-motion:reduce){
  html[data-theme="dark"] body.da-standalone > .home-nav.da-site-header{background:#1c1b15!important;border-color:#504d40!important}
  html[data-theme="dark"] body.da-standalone #dealAnalysisView #daDealResults .deal-verdict-row{background:#302e25!important;border-color:#716a57!important}
}

/* Deal Analysis contrast fix: light-mode unit labels and workspace action.
   Route-scoped presentation only; no changes to calculations, services, or auth. */
body.da-standalone #dealAnalysisView .unit-row .unit-num {
  color:#294057!important;
  opacity:1!important;
  font-weight:700!important;
}
body.da-standalone .masthead-actions .deal-save-actions a.deal-dashboard-link {
  color:#173d35!important;
  -webkit-text-fill-color:#173d35!important;
  background:#e8f3ee!important;
  border:1px solid #8fb6a7!important;
  opacity:1!important;
}
body.da-standalone .masthead-actions .deal-save-actions a.deal-dashboard-link:hover,
body.da-standalone .masthead-actions .deal-save-actions a.deal-dashboard-link:focus-visible {
  color:#103429!important;
  -webkit-text-fill-color:#103429!important;
  background:#d4e9df!important;
  border-color:#387761!important;
}
html[data-theme="dark"] body.da-standalone #dealAnalysisView .unit-row .unit-num {
  color:#f0eadd!important;
}
html[data-theme="dark"] body.da-standalone .masthead-actions .deal-save-actions a.deal-dashboard-link {
  color:#f7f4ec!important;
  -webkit-text-fill-color:#f7f4ec!important;
  background:#302e25!important;
  border-color:#857e6c!important;
}
html[data-theme="dark"] body.da-standalone .masthead-actions .deal-save-actions a.deal-dashboard-link:hover,
html[data-theme="dark"] body.da-standalone .masthead-actions .deal-save-actions a.deal-dashboard-link:focus-visible {
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  background:#444034!important;
  border-color:#b3a789!important;
}
