/* Route-scoped visual system for Fix & Flip and Compare Properties.
   No shared Home, Deal Analysis, Mortgage, DSCR or Affordability styles are changed. */
body.ds-premium-tool{--pt-surface:var(--mc-surface);--pt-ink:var(--mc-ink);--pt-muted:var(--mc-muted);--pt-stroke:var(--mc-stroke);--pt-tint:var(--mc-tint);--pt-accent:var(--mc-pine)}
html body.ds-premium-tool.analyzer-property{background:var(--mc-page)!important;background-image:none!important;color:var(--pt-ink)!important}
body.ds-premium-tool #propertyAnalyzer > :not(#fixFlipView):not(#comparePropertiesView){display:none!important}
body.ds-premium-tool #propertyAnalyzer > :is(#fixFlipView,#comparePropertiesView){display:none!important}
body.ds-premium-fix #propertyAnalyzer > #fixFlipView.active,body.ds-premium-compare #propertyAnalyzer > #comparePropertiesView.active{display:block!important;visibility:visible!important;position:relative!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;margin:0!important;padding:0!important;background:transparent!important;background-image:none!important;border:none!important;color:var(--pt-ink)!important;box-shadow:none!important}
body.ds-premium-tool #propertyAnalyzer{display:block!important;min-width:0!important;max-width:100%!important;overflow:visible!important}
body.ds-premium-tool .mc-intro-aside{color:var(--pt-ink)!important}
body.ds-premium-tool .mc-intro-aside .mc-aside-pill{background:#e4f2ea!important;color:#144736!important}
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) :is(h2,h3,legend,label){color:var(--pt-ink)!important;opacity:1!important}
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) :is(p,.card-sub,.hint,.vsub,.business-note,.compare-toolbar-note,.compare-intro-card p,.compare-summary p){color:var(--pt-muted)!important;opacity:1!important}
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) :is(.card,.ff-topbar,.compare-intro-card,.compare-toolbar,.compare-summary,.compare-property-shell){min-width:0!important;max-width:100%!important;background:var(--pt-surface)!important;background-image:none!important;border:1px solid var(--pt-stroke)!important;border-radius:17px!important;box-shadow:var(--mc-shadow)!important;color:var(--pt-ink)!important}
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) :is(input:not([type=checkbox]),select,textarea){max-width:100%!important;min-width:0!important;min-height:43px!important;box-sizing:border-box!important;border-radius:9px!important;background:var(--mc-field)!important;background-image:none!important;border:1px solid #8ca6b2!important;color:var(--mc-field-text)!important;opacity:1!important;box-shadow:none!important;font:600 14px/1.45 Inter,Arial,sans-serif!important}
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) input::placeholder{color:#596977!important;opacity:1!important}
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) input[readonly]{background:var(--pt-tint)!important;color:var(--pt-ink)!important}
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) :is(input,select,button):focus-visible{outline:3px solid #14927c!important;outline-offset:2px!important}
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) :is(input,select).attention-required,
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) :is(input,select)[aria-invalid=true]{border:2px solid #c45f2b!important;box-shadow:0 0 0 3px rgba(196,95,43,.16)!important}
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) button{cursor:pointer}
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) :is(.clear-section-btn,.ff-mode-btn,.compare-mobile-tab,.copy-actions button){border:1px solid var(--pt-stroke)!important;background:var(--pt-tint)!important;background-image:none!important;color:var(--pt-ink)!important;border-radius:9px!important;font:700 13px/1.35 Inter,Arial,sans-serif!important;padding:10px 14px!important}
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) :is(.ff-mode-btn.active,.compare-mobile-tab.active,.copy-actions button:hover){background:#147966!important;color:#fff!important;border-color:#147966!important}
/* Pro access stays fail-closed. These rules only adjust the existing gate presentation. */
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView).pro-access-locked:not(.pro-access-granted){height:350px!important;min-height:350px!important;overflow:hidden!important}
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView).pro-access-locked:not(.pro-access-granted)>:not(.pro-lock-overlay){visibility:hidden!important}
body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView).pro-access-locked:not(.pro-access-granted)>.pro-lock-overlay{position:absolute!important;inset:0!important;z-index:99!important;display:flex!important;visibility:visible!important;align-items:center!important;justify-content:center!important;padding:20px!important;background:var(--pt-surface)!important;color:var(--pt-ink)!important;border:1px solid var(--pt-stroke)!important;border-radius:17px!important;box-shadow:var(--mc-shadow)!important}
body.ds-premium-tool .pro-lock-panel{width:min(100%,540px)!important;max-width:540px!important;min-width:0!important;max-height:100%!important;overflow:auto!important;margin:auto!important;padding:24px!important;border:1px solid var(--pt-stroke)!important;border-radius:15px!important;background:var(--pt-tint)!important;color:var(--pt-ink)!important}
body.ds-premium-tool .pro-lock-panel :is(h2,h3,strong){color:var(--pt-ink)!important}
body.ds-premium-tool .pro-lock-panel :is(p,small){color:var(--pt-muted)!important}
body.ds-premium-tool .pro-lock-panel a{background:#147966!important;color:#fff!important;border-radius:10px!important}
/* Fix & Flip. Retain all old input and output IDs for the original calculation engine. */
body.ds-premium-fix #fixFlipView .ff-topbar{padding:24px!important;display:flex!important;flex-wrap:wrap!important;gap:12px!important;align-items:center!important;margin:0 0 18px!important}
body.ds-premium-fix #fixFlipView .ff-topbar h2{font:700 clamp(25px,3vw,33px)/1.2 'Space Grotesk',Inter,sans-serif!important;margin:2px 0 5px!important;color:var(--pt-ink)!important}
body.ds-premium-fix #fixFlipView .ff-topbar .ff-kicker{color:#1d68ac!important}
body.ds-premium-fix #fixFlipView .ff-topbar p{color:var(--pt-muted)!important}
body.ds-premium-fix #fixFlipView #ffVerdictStrip{position:static!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;padding:15px!important;margin:0 0 18px!important;border:1px solid var(--pt-stroke)!important;border-radius:17px!important;background:var(--pt-surface)!important;background-image:none!important;box-shadow:var(--mc-shadow)!important;color:var(--pt-ink)!important}
body.ds-premium-fix #fixFlipView #ffVerdictStrip>.vcell{min-width:0!important;margin:0!important;padding:16px!important;border:1px solid var(--pt-stroke)!important;border-radius:12px!important;background:var(--pt-tint)!important;color:var(--pt-ink)!important;box-shadow:none!important}
body.ds-premium-fix #fixFlipView #ffVerdictStrip>.vcell:nth-child(1){background:#e4f3fa!important}
body.ds-premium-fix #fixFlipView #ffVerdictStrip>.vcell:nth-child(2){background:#f1e9ff!important}
body.ds-premium-fix #fixFlipView #ffVerdictStrip>.vcell:nth-child(3){background:#e4f6ee!important}
body.ds-premium-fix #fixFlipView #ffVerdictStrip>.vcell:nth-child(4){background:#fff3dc!important}
body.ds-premium-fix #fixFlipView #ffVerdictStrip .vlabel{color:#31465b!important;opacity:1!important;font-weight:800!important}
body.ds-premium-fix #fixFlipView #ffVerdictStrip .vvalue{color:#15283d!important;opacity:1!important;font:750 clamp(23px,2.5vw,32px)/1.15 'Space Grotesk',Inter,sans-serif!important;overflow-wrap:anywhere!important}
body.ds-premium-fix #fixFlipView #ffVerdictStrip .vsub{color:#415567!important;opacity:1!important}
body.ds-premium-fix #fixFlipView #ffVerdictStrip .badge-row :is(span,strong){color:#273e51!important}
body.ds-premium-fix #fixFlipView #ffVerdictStrip .deal-verdict-row{grid-column:1/-1!important;margin:0!important;padding:14px 17px!important;background:var(--pt-tint)!important;border:1px solid var(--pt-stroke)!important;border-radius:12px!important;color:var(--pt-ink)!important}
body.ds-premium-fix #fixFlipView #ffVerdictStrip .deal-verdict-row :is(.deal-verdict-label,.deal-verdict-reason){color:var(--pt-ink)!important}
body.ds-premium-fix #fixFlipView #ffVerdictStrip #ffVerdict{color:var(--pt-ink)!important;text-shadow:none!important;opacity:1!important}
body.ds-premium-fix #fixFlipView .ff-card{padding:25px 26px!important;margin:0 0 18px!important;color:var(--pt-ink)!important}
body.ds-premium-fix #fixFlipView .ff-card h2{font:700 23px/1.25 'Space Grotesk',Inter,sans-serif!important;margin:0 0 9px!important;color:var(--pt-ink)!important}
body.ds-premium-fix #fixFlipView .ff-card .grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px 20px!important;max-width:100%!important;min-width:0!important}
body.ds-premium-fix #fixFlipView .ff-card .field{min-width:0!important;max-width:100%!important}
body.ds-premium-fix #fixFlipView .ff-card .field label{display:block!important;font:700 13px/1.45 Inter,Arial,sans-serif!important;margin-bottom:6px!important;color:var(--pt-ink)!important}
body.ds-premium-fix #fixFlipView .ff-card .field :is(input,select){width:100%!important}
body.ds-premium-fix #fixFlipView .ff-itemized-block{min-width:0!important;background:var(--pt-tint)!important;background-image:none!important;border:1px solid var(--pt-stroke)!important;border-radius:12px!important;padding:15px!important;margin:16px 0!important;color:var(--pt-ink)!important}
body.ds-premium-fix #fixFlipView .ff-subheading{color:var(--pt-ink)!important;font-weight:800!important}
body.ds-premium-fix #fixFlipView .future-metrics{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
body.ds-premium-fix #fixFlipView .future-metric,body.ds-premium-fix #fixFlipView .ff-stress-card :is(.stress-scenario,.ff-stress-scenario){background:var(--pt-tint)!important;color:var(--pt-ink)!important;border:1px solid var(--pt-stroke)!important;border-radius:12px!important;min-width:0!important;overflow-wrap:anywhere!important}
body.ds-premium-fix #fixFlipView .future-metric :is(strong,.fm-value){color:var(--pt-ink)!important}
body.ds-premium-fix #fixFlipView .screening-disclaimer{color:var(--pt-muted)!important;background:var(--pt-tint)!important;border:1px solid var(--pt-stroke)!important;border-radius:12px!important}
/* Comparison: the original independent iframe calculators and postMessage engine remain intact. */
body.ds-premium-compare #comparePropertiesView .compare-intro-card,body.ds-premium-compare #comparePropertiesView .compare-toolbar,body.ds-premium-compare #comparePropertiesView .compare-summary{padding:24px!important;margin:0 0 17px!important}
body.ds-premium-compare #comparePropertiesView .compare-intro-card h2,body.ds-premium-compare #comparePropertiesView .compare-summary h2{font:700 25px/1.2 'Space Grotesk',Inter,sans-serif!important;color:var(--pt-ink)!important;text-transform:none!important;letter-spacing:normal!important}
body.ds-premium-compare #comparePropertiesView .compare-toolbar-title{font-weight:800!important;color:var(--pt-ink)!important}
body.ds-premium-compare #comparePropertiesView .copy-options{display:flex!important;flex-wrap:wrap!important;gap:9px!important}
body.ds-premium-compare #comparePropertiesView .copy-options label{color:var(--pt-ink)!important;background:var(--pt-tint)!important;border-radius:8px!important;padding:8px 10px!important}
body.ds-premium-compare #comparePropertiesView .compare-columns{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important;gap:16px!important;min-width:0!important;width:100%!important}
body.ds-premium-compare #comparePropertiesView .compare-property-shell{overflow:hidden!important;min-width:0!important;max-width:100%!important;border-radius:15px!important}
body.ds-premium-compare #comparePropertiesView .compare-property-head{background:var(--pt-tint)!important;border-bottom:1px solid var(--pt-stroke)!important;color:var(--pt-ink)!important;padding:16px!important}
body.ds-premium-compare #comparePropertiesView .compare-property-head :is(label,span,strong){color:var(--pt-ink)!important;opacity:1!important}
body.ds-premium-compare #comparePropertiesView .compare-frame{display:block!important;min-width:0!important;width:100%!important;height:1300px!important;border:0!important;background:var(--pt-surface)!important}
body.ds-premium-compare #comparePropertiesView .compare-summary{overflow-x:auto!important}
body.ds-premium-compare #comparePropertiesView .property-compare-table{min-width:540px!important;width:100%!important;border-collapse:collapse!important;color:var(--pt-ink)!important}
body.ds-premium-compare #comparePropertiesView .property-compare-table :is(th,td){background:var(--pt-surface)!important;color:var(--pt-ink)!important;border-bottom:1px solid var(--pt-stroke)!important;padding:12px!important}
body.ds-premium-compare #comparePropertiesView .property-compare-table th{background:var(--pt-tint)!important;font-weight:800!important}
body.ds-premium-compare #comparePropertiesView .compare-mobile-tabs{display:none!important}
/* Dark brown approved palette, not legacy navy or green. */
html[data-theme=dark] body.ds-premium-tool{--mc-page:#16150f;--mc-surface:#24231c;--mc-ink:#f7f4ec;--mc-muted:#cbc5b8;--mc-stroke:#504d40;--mc-tint:#302e25;--mc-pine:#a4e5c5;--mc-green:#a4e5c5;--mc-field:#211f19;--mc-field-text:#f7f4ec;--mc-shadow:0 14px 36px rgba(0,0,0,.22)}
html[data-theme=dark] body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) :is(input:not([type=checkbox]),select,textarea){border-color:#827b6c!important;background:#211f19!important;color:#f7f4ec!important}
html[data-theme=dark] body.ds-premium-tool :is(#fixFlipView,#comparePropertiesView) input::placeholder{color:#bbb4a4!important}
html[data-theme=dark] body.ds-premium-fix #fixFlipView #ffVerdictStrip>.vcell:nth-child(1){background:#193748!important}
html[data-theme=dark] body.ds-premium-fix #fixFlipView #ffVerdictStrip>.vcell:nth-child(2){background:#352b50!important}
html[data-theme=dark] body.ds-premium-fix #fixFlipView #ffVerdictStrip>.vcell:nth-child(3){background:#1b3d32!important}
html[data-theme=dark] body.ds-premium-fix #fixFlipView #ffVerdictStrip>.vcell:nth-child(4){background:#4a371e!important}
html[data-theme=dark] body.ds-premium-fix #fixFlipView #ffVerdictStrip .vcell :is(.vlabel,.vvalue,.vsub,.badge-row span,.badge-row strong){color:#f7f4ec!important}
@media(max-width:960px){body.ds-premium-fix #fixFlipView #ffVerdictStrip{grid-template-columns:repeat(2,minmax(0,1fr))!important}body.ds-premium-compare #comparePropertiesView .compare-columns{grid-template-columns:minmax(0,1fr)!important}body.ds-premium-compare #comparePropertiesView .compare-mobile-tabs{display:flex!important;gap:9px!important}body.ds-premium-compare #comparePropertiesView .compare-property-shell{display:none!important}body.ds-premium-compare #comparePropertiesView .compare-property-shell.mobile-active{display:block!important}}
@media(max-width:620px){body.ds-premium-fix #fixFlipView .ff-card{padding:18px!important}body.ds-premium-fix #fixFlipView .ff-card .grid{grid-template-columns:minmax(0,1fr)!important}body.ds-premium-fix #fixFlipView #ffVerdictStrip{padding:10px!important;gap:8px!important}body.ds-premium-fix #fixFlipView #ffVerdictStrip>.vcell{padding:12px!important}body.ds-premium-fix #fixFlipView .future-metrics{grid-template-columns:minmax(0,1fr)!important}body.ds-premium-compare #comparePropertiesView .compare-intro-card,body.ds-premium-compare #comparePropertiesView .compare-toolbar,body.ds-premium-compare #comparePropertiesView .compare-summary{padding:17px!important}body.ds-premium-tool .pro-lock-panel{padding:15px!important}}
@media(prefers-reduced-motion:reduce){body.ds-premium-tool .mc-intro-aside{animation:none!important}}
/* Outrank the inherited selector with two ID-valued :not() clauses (three ID specificity). */
body.ds-premium-tool.ds-premium-fix #propertyAnalyzer > #fixFlipView#fixFlipView.active,
body.ds-premium-tool.ds-premium-compare #propertyAnalyzer > #comparePropertiesView#comparePropertiesView.active{display:block!important}
/* PRO gate text must remain readable against the light and dark card surfaces. */
body.ds-premium-tool .pro-lock-panel .pro-lock-note{color:var(--pt-muted)!important;opacity:1!important}
body.ds-premium-tool .pro-lock-panel .pro-lock-badge{color:#0c654f!important;background:#dbf2e9!important;opacity:1!important}
html[data-theme=dark] body.ds-premium-tool .pro-lock-panel .pro-lock-badge{color:#a4e5c5!important;background:#264039!important}
/* Keep compound amount/mode controls separate; remove the inherited dark seam. */
body.ds-premium-fix #fixFlipView .inline-input-mode{display:flex!important;align-items:stretch!important;gap:8px!important;max-width:100%!important;min-width:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
body.ds-premium-fix #fixFlipView .inline-input-mode>input{flex:1 1 auto!important;width:auto!important;min-width:0!important;margin:0!important}
body.ds-premium-fix #fixFlipView .inline-input-mode>select{flex:0 0 72px!important;width:72px!important;min-width:72px!important;max-width:72px!important;margin:0!important}
