/* MEDIPHARM Clinical Q&A v10.5.6 — Stable Module Accent Palette Hotfix
   Exact parent: v10.5.5 Wrapper Simplification & Soft Surface Hotfix.
   Presentation/runtime-markup only; no clinical content, importer, REST, DB, routing or access changes.

   Contract:
   - A module owns one accent colour. Rotating/reloaded questions cannot change that module's accent.
   - Palette is deliberately fresh/light: blue, sky, teal, violet and warm gold; no slate/near-black accent.
   - Borders remain neutral/light; accent is used as a restrained cue, not a heavy frame. */

#mcqa-app.mcqa-app{
  --mcqa-accent-blue:#4f97cf;
  --mcqa-accent-sky:#58abc7;
  --mcqa-accent-teal:#43a99d;
  --mcqa-accent-violet:#9278d6;
  --mcqa-accent-gold:#d7a746;
}

/* Featured module: always violet, independent of the rotating specialty/question. */
#mcqa-app.mcqa-app .mcqa-v10-featured-card{
  --feature-accent:var(--mcqa-accent-violet)!important;
  border-color:#e0e8ee!important;
  box-shadow:inset 3px 0 0 color-mix(in srgb,var(--mcqa-accent-violet) 58%,transparent)!important;
}
#mcqa-app.mcqa-app .mcqa-v10-featured-meta span{
  background:color-mix(in srgb,var(--mcqa-accent-violet) 9%,#fff)!important;
  color:#725eb1!important;
}
#mcqa-app.mcqa-app .mcqa-v10-featured-meta .mcqa-v10-featured-topic{
  border-color:color-mix(in srgb,var(--mcqa-accent-violet) 14%,#dfe8ee)!important;
  background:color-mix(in srgb,var(--mcqa-accent-violet) 4%,#fff)!important;
}
#mcqa-app.mcqa-app .mcqa-v10-featured-answer{
  border-color:color-mix(in srgb,var(--mcqa-accent-violet) 12%,#dfe9ef)!important;
  background:linear-gradient(180deg,color-mix(in srgb,var(--mcqa-accent-violet) 2.5%,#fff),#fff)!important;
}

/* Latest module: always fresh blue. Individual specialties no longer recolour rows. */
#mcqa-app.mcqa-app .mcqa-v10-latest-panel,
#mcqa-app.mcqa-app .mcqa-v10-latest-list,
#mcqa-app.mcqa-app button.mcqa-v10-latest-item,
#mcqa-app.mcqa-app .mcqa-latest-answer-hero{
  --latest-accent:var(--mcqa-accent-blue)!important;
}
#mcqa-app.mcqa-app button.mcqa-v10-latest-item{
  border-color:#e1eaf0!important;
  background:linear-gradient(180deg,#fff,#fbfdfe)!important;
}
#mcqa-app.mcqa-app button.mcqa-v10-latest-item:hover{
  background:color-mix(in srgb,var(--mcqa-accent-blue) 4%,#fff)!important;
  border-color:color-mix(in srgb,var(--mcqa-accent-blue) 18%,#dde7ed)!important;
}
#mcqa-app.mcqa-app .mcqa-v10-latest-index{
  background:color-mix(in srgb,var(--mcqa-accent-blue) 10%,#fff)!important;
  color:#337fb7!important;
  border-color:color-mix(in srgb,var(--mcqa-accent-blue) 12%,transparent)!important;
}
#mcqa-app.mcqa-app .mcqa-v10-latest-arrow{color:#438fc5!important}

/* Spotlight module: fixed teal even when the spotlight question rotates. */
#mcqa-app.mcqa-app .mcqa-hero-spotlight{
  --accent:var(--mcqa-accent-teal)!important;
}

/* Specialty modules: accent belongs to the specialty module, not to its changing questions. */
#mcqa-app.mcqa-app .mcqa-v10-specialty-module[data-accent="blue"]{--disc-accent:var(--mcqa-accent-blue)!important}
#mcqa-app.mcqa-app .mcqa-v10-specialty-module[data-accent="sky"]{--disc-accent:var(--mcqa-accent-sky)!important}
#mcqa-app.mcqa-app .mcqa-v10-specialty-module[data-accent="teal"]{--disc-accent:var(--mcqa-accent-teal)!important}
#mcqa-app.mcqa-app .mcqa-v10-specialty-module[data-accent="violet"],
#mcqa-app.mcqa-app .mcqa-v10-specialty-module[data-accent="indigo"]{--disc-accent:var(--mcqa-accent-violet)!important}
#mcqa-app.mcqa-app .mcqa-v10-specialty-module[data-accent="gold"],
#mcqa-app.mcqa-app .mcqa-v10-specialty-module[data-accent="slate"]{--disc-accent:var(--mcqa-accent-gold)!important}

/* Keep all descendants of a specialty module on the same inherited accent. */
#mcqa-app.mcqa-app .mcqa-v10-specialty-module .mcqa-v10-specialty-hero,
#mcqa-app.mcqa-app .mcqa-v10-specialty-module .mcqa-v10-specialty-list-item,
#mcqa-app.mcqa-app .mcqa-v10-specialty-module .mcqa-v10-specialty-load-more{
  --disc-accent:inherit;
}

/* Specialty tiles use the same light palette; slate is retired visually to warm gold. */
#mcqa-app.mcqa-app .mcqa-v10-specialty-tile[data-accent="blue"]{--tile-accent:var(--mcqa-accent-blue)!important;--tile-soft:#f1f7fc!important}
#mcqa-app.mcqa-app .mcqa-v10-specialty-tile[data-accent="sky"]{--tile-accent:var(--mcqa-accent-sky)!important;--tile-soft:#f0f9fb!important}
#mcqa-app.mcqa-app .mcqa-v10-specialty-tile[data-accent="teal"]{--tile-accent:var(--mcqa-accent-teal)!important;--tile-soft:#f1faf7!important}
#mcqa-app.mcqa-app .mcqa-v10-specialty-tile[data-accent="violet"],
#mcqa-app.mcqa-app .mcqa-v10-specialty-tile[data-accent="indigo"]{--tile-accent:var(--mcqa-accent-violet)!important;--tile-soft:#f6f3fd!important}
#mcqa-app.mcqa-app .mcqa-v10-specialty-tile[data-accent="gold"],
#mcqa-app.mcqa-app .mcqa-v10-specialty-tile[data-accent="slate"]{--tile-accent:var(--mcqa-accent-gold)!important;--tile-soft:#fff9ed!important}

/* Detail drawer is one module: fixed blue regardless of which question is opened. */
#mcqa-app.mcqa-app .mcqa-detail{
  --accent:var(--mcqa-accent-blue)!important;
  --accent-soft:#f1f7fc!important;
  --accent-line:#dbe9f3!important;
}
#mcqa-app.mcqa-app .mcqa-detail-head{
  border-color:#dfe8ee!important;
  background:linear-gradient(180deg,#f7fbfe,#fff)!important;
}
#mcqa-app.mcqa-app .mcqa-answer-box{
  border-color:#dbe8f1!important;
  background:linear-gradient(180deg,#f7fbfe,#fff)!important;
}

/* Related questions are one submodule: one soft violet accent, not alternating card colours. */
#mcqa-app.mcqa-app .mcqa-related-grid .mcqa-related-card,
#mcqa-app.mcqa-app .mcqa-related-grid .mcqa-related-card:nth-child(n){
  background:linear-gradient(180deg,color-mix(in srgb,var(--mcqa-accent-violet) 3.5%,#fff),#fff)!important;
  border-color:color-mix(in srgb,var(--mcqa-accent-violet) 12%,#dfe8ee)!important;
}
#mcqa-app.mcqa-app .mcqa-related-grid .mcqa-related-card i{color:#725eb1!important}

/* Retire any accidental dark/slate accent from reader-facing light mode. */
#mcqa-app.mcqa-app [data-accent="slate"]{
  --feature-accent:var(--mcqa-accent-gold)!important;
  --latest-accent:var(--mcqa-accent-gold)!important;
  --tile-accent:var(--mcqa-accent-gold)!important;
  --disc-accent:var(--mcqa-accent-gold)!important;
}

/* Dark mode keeps the same module identity, but the accent itself remains soft and readable. */
html:is(.tvm-dark,.yhlsm-dark,.nah-sdp-dark-mode,.nah-sdp-night-active,.nahmed-dark) #mcqa-app.mcqa-app,
html.dark #mcqa-app.mcqa-app,
body.dark #mcqa-app.mcqa-app,
[data-theme="dark"] #mcqa-app.mcqa-app,
.dark-mode #mcqa-app.mcqa-app,
.is-dark #mcqa-app.mcqa-app{
  --mcqa-accent-blue:#72add6;
  --mcqa-accent-sky:#76b8cc;
  --mcqa-accent-teal:#68b7ac;
  --mcqa-accent-violet:#a895dc;
  --mcqa-accent-gold:#d9b565;
}
