/* MOTwise feature-suite final UI authority v46.
   Loaded last on all six feature pages so theme contrast and component polish are deterministic. */

body[data-feature]{--suite-accent:var(--mw-accent,var(--mt-blue,#0b63e6));--suite-radius:12px}

/* High-contrast intelligence surfaces: never inherit dark text in light mode. */
html body[data-feature] .mwx-v1-hero,
html[data-theme="light"] body[data-feature] .mwx-v1-hero,
html[data-mw-theme="light"] body[data-feature] .mwx-v1-hero,
html[data-theme="dark"] body[data-feature] .mwx-v1-hero,
html[data-mw-theme="dark"] body[data-feature] .mwx-v1-hero{
  background:linear-gradient(120deg,#071f3d 0%,#0b3f76 72%,#11508e 100%)!important;
  color:#fff!important;border-color:rgba(255,255,255,.10)!important
}
html body[data-feature] .mwx-v1-hero :where(h1,h2,h3,strong),
html body[data-feature] .mwx-v1-hero .mwx-confidence strong{
  color:#fff!important;-webkit-text-fill-color:#fff!important;text-shadow:none!important
}
html body[data-feature] .mwx-v1-hero :where(p,span,small),
html body[data-feature] .mwx-v1-hero .mwx-confidence span{
  color:#d7e5f2!important;-webkit-text-fill-color:#d7e5f2!important
}
html body[data-feature] .mwx-v1-hero .mwx-confidence:after{background:#0a335d!important}

/* Shared page rhythm and summary hierarchy. */
body[data-feature] .mwf-content{max-width:1440px!important}
body[data-feature] .mwf-hero{gap:12px!important;margin-bottom:14px!important}
body[data-feature] .mwf-title,body[data-feature] .mwf-summary{border-radius:13px!important;box-shadow:0 5px 16px var(--mt-shadow,rgba(18,45,74,.045))!important}
body[data-feature] .mwf-title{padding:19px 21px!important}
body[data-feature] .mwf-title h1{font-size:26px!important;line-height:1.08!important}
body[data-feature] .mwf-title p{font-size:12px!important;line-height:1.48!important}
body[data-feature] .mwf-summary{padding:9px!important;gap:8px!important}
body[data-feature] .mwx-metric{min-height:74px!important;padding:10px 11px!important;border-radius:9px!important;background:var(--mt-surface-2,#f8fbff)!important;border:1px solid var(--mt-line,#d8e3ee)!important}
body[data-feature] .mwx-metric:first-child{border-top:3px solid var(--suite-accent)!important}
body[data-feature] .mwx-metric strong{color:var(--mt-text,#081a33)!important;font-size:18px!important}
body[data-feature] .mwx-metric small{color:var(--mt-muted,#60758d)!important;font-size:8.5px!important}
body[data-feature] .mwx-metric span{color:var(--mt-muted,#60758d)!important;font-size:9.5px!important}

body[data-feature] .mwx-panel{border-radius:12px!important;box-shadow:none!important}
body[data-feature] .mwx-panel h2{font-size:15px!important;margin-bottom:10px!important}
body[data-feature] .mwx-panel h2:before{background:var(--suite-accent)!important}
body[data-feature] .mwx-boundary{background:var(--mt-surface-2,#f8fbff)!important;color:var(--mt-text-2,#314b65)!important;border:1px solid var(--mt-line,#d8e3ee)!important}

/* AI Explainability */
body[data-feature="ai"]{--suite-accent:#1769d2}
body[data-feature="ai"] .mwx-v1-hero{min-height:112px!important;padding:17px 20px!important;margin-bottom:12px!important}
body[data-feature="ai"] .mwx-v1-hero h2{font-size:22px!important}
body[data-feature="ai"] .mwx-grid .mwx-panel:nth-child(1) .phase2-list li b{background:var(--mt-green-bg,#eaf7ef)!important;color:var(--mt-green,#078f47)!important}
body[data-feature="ai"] .mwx-grid .mwx-panel:nth-child(2) .phase2-list li b{background:var(--mt-amber-bg,#fff5df)!important;color:var(--mt-amber,#a86700)!important}

/* Negotiation: reinforce v45 contrast after every shared theme layer. */
body[data-feature="negotiation"]{--suite-accent:#6f42d9}
html body[data-feature="negotiation"] .mwx-neg-v37-hero h2,
html[data-theme="light"] body[data-feature="negotiation"] .mwx-neg-v37-hero h2,
html[data-mw-theme="light"] body[data-feature="negotiation"] .mwx-neg-v37-hero h2{
  color:#fff!important;-webkit-text-fill-color:#fff!important
}
html body[data-feature="negotiation"] .mwx-neg-v37-hero .mwx-confidence strong,
html[data-theme="light"] body[data-feature="negotiation"] .mwx-neg-v37-hero .mwx-confidence strong,
html[data-mw-theme="light"] body[data-feature="negotiation"] .mwx-neg-v37-hero .mwx-confidence strong{
  color:#fff!important;-webkit-text-fill-color:#fff!important
}
html body[data-feature="negotiation"] .mwx-neg-v37-hero :where(p,span),
html[data-theme="light"] body[data-feature="negotiation"] .mwx-neg-v37-hero :where(p,span){color:#d7e5f2!important;-webkit-text-fill-color:#d7e5f2!important}

/* Repair Prediction */
body[data-feature="repair"]{--suite-accent:#e86d18}
body[data-feature="repair"] .mwx-note{display:grid!important;grid-template-columns:auto 1fr!important;gap:10px!important;padding:11px 13px!important;border-radius:10px!important;box-shadow:none!important}
body[data-feature="repair"] .mwx-note strong{font-size:10.5px!important}
body[data-feature="repair"] .mwx-note span{font-size:10.5px!important;line-height:1.45!important}
body[data-feature="repair"] .mwx-repair-list{gap:10px!important}
body[data-feature="repair"] .mwx-repair-card{position:relative;overflow:hidden;padding:14px!important;border-radius:11px!important;box-shadow:none!important}
body[data-feature="repair"] .mwx-repair-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--suite-accent)}
body[data-feature="repair"] .mwx-repair-card h3{font-size:16px!important;color:var(--mt-text,#081a33)!important}
body[data-feature="repair"] .mwx-prob strong{color:var(--suite-accent)!important}
body[data-feature="repair"] .mwx-cost{background:var(--mt-surface-2,#f8fbff);border-radius:8px;padding:9px 10px!important;border-top:0!important}

/* Ownership Planner */
body[data-feature="ownership"]{--suite-accent:#0f8b8d}
body[data-feature="ownership"] .ownership-results{gap:8px!important}
body[data-feature="ownership"] .ownership-results>div{min-height:76px!important;padding:11px 12px!important;border-radius:10px!important;box-shadow:none!important;background:var(--mt-surface-2,#f8fbff)!important}
body[data-feature="ownership"] .ownership-results>div:first-child{border-top:3px solid var(--suite-accent)!important}
body[data-feature="ownership"] .ownership-form-grid{gap:9px!important}
body[data-feature="ownership"] .ownership-form-grid input,body[data-feature="ownership"] .ownership-form-grid select{height:44px!important;border-radius:9px!important;background:var(--mt-field,#fff)!important;color:var(--mt-text,#081a33)!important}
body[data-feature="ownership"] .ownership-form-grid button{min-height:44px!important;border:0!important;border-radius:9px!important;background:linear-gradient(90deg,#0f7f82,#18a0a2)!important;color:#fff!important;font-weight:900!important;box-shadow:0 6px 14px rgba(15,139,141,.17)!important}

/* Technical Report */
body[data-feature="technical"]{--suite-accent:#315fbd}
body[data-feature="technical"] .mwx-test{overflow:hidden!important;margin-bottom:8px!important;border-radius:10px!important;box-shadow:none!important}
body[data-feature="technical"] .mwx-test header{padding:10px 12px!important;background:var(--mt-surface-2,#f8fbff)!important}
body[data-feature="technical"] .mwx-test header strong{font-size:12.5px!important;color:var(--mt-text,#081a33)!important}
body[data-feature="technical"] .mwx-test-defects>div{padding:9px 12px!important}
body[data-feature="technical"] .mwx-test-defects p{line-height:1.45!important}
body[data-feature="technical"] .mwx-badge{font-size:9px!important;padding:4px 8px!important}

/* AI Chatbot */
body[data-feature="chatbot"]{--suite-accent:#159447}
body[data-feature="chatbot"] .mwx-chat-panel{padding:15px 16px!important;border-top:3px solid var(--suite-accent)!important;border-radius:12px!important;box-shadow:none!important}
body[data-feature="chatbot"] .mwx-prompts{gap:7px!important;margin:12px 0!important}
body[data-feature="chatbot"] .mwx-prompts button{padding:7px 10px!important;border-radius:999px!important;background:var(--mt-surface,#fff)!important;color:var(--mt-text-2,#314b65)!important;border:1px solid var(--mt-line,#d8e3ee)!important}
body[data-feature="chatbot"] .mwx-prompts button:hover{border-color:var(--suite-accent)!important;background:color-mix(in srgb,var(--suite-accent) 8%,var(--mt-surface,#fff))!important}
body[data-feature="chatbot"] .mwx-conversation{min-height:320px!important;max-height:450px!important;border-radius:11px!important;background:var(--mt-surface-2,#f8fbff)!important}
body[data-feature="chatbot"] .mwx-chat input{height:44px!important;border-radius:9px!important;background:var(--mt-field,#fff)!important;color:var(--mt-text,#081a33)!important}
body[data-feature="chatbot"] .mwx-chat button{height:44px!important;border-radius:9px!important;background:var(--suite-accent)!important;color:#fff!important;font-weight:900!important}

/* Embedded Dashboard popup content: same design, denser chrome. */
html[data-mw-embedded="true"] body[data-feature] .mwf-content,
body[data-mw-embedded="true"][data-feature] .mwf-content{padding:12px 14px 18px!important}
html[data-mw-embedded="true"] body[data-feature] .mwf-summary,
body[data-mw-embedded="true"][data-feature] .mwf-summary{margin-bottom:10px!important}
html[data-mw-embedded="true"] body[data-feature] .mwx-v1-hero,
body[data-mw-embedded="true"][data-feature] .mwx-v1-hero{box-shadow:none!important}

@media(max-width:760px){
  body[data-feature] .mwf-title h1{font-size:23px!important}
  body[data-feature] .mwf-summary{grid-template-columns:1fr 1fr!important}
  body[data-feature] .mwf-summary .mwx-metric:last-child{grid-column:1/-1}
  body[data-feature] .mwx-v1-hero{align-items:flex-start!important;flex-direction:column!important}
  body[data-feature="repair"] .mwx-note{grid-template-columns:1fr!important}
}
