/* MUSAMY Engine — centralized styles.
 * Ported from the live site's own CSS (extracted 2026-11-22 from
 * musamy.com inline custom CSS + uploads/elementor/css/post-5108.css):
 * every rule below names its source. Not a redesign — the same values.
 */

/* --- global chrome (source: homepage inline custom CSS) --- */
.ms-engine a, .ms-engine a:visited { color: #EDEDED; text-decoration: none; }
.ms-engine a:hover { color: #FF5C1F; }
.ms-engine img { border-radius: 0 !important; }
body.ms-engine-home:before, body.ms-engine-home:after,
body.ms-engine-project:before, body.ms-engine-project:after {
  content: ""; position: fixed; top: 0; bottom: 0; width: 18px; z-index: 60; pointer-events: none;
  background: repeating-linear-gradient(-45deg, rgba(255,252,245,.13) 0 1px, transparent 1px 7px);
}
body.ms-engine-home:before, body.ms-engine-project:before { left: 0; border-right: 1px dashed rgba(255,252,245,.16); }
body.ms-engine-home:after, body.ms-engine-project:after { right: 0; border-left: 1px dashed rgba(255,252,245,.16); }
@media (max-width:1024px) {
  body.ms-engine-home:before, body.ms-engine-home:after,
  body.ms-engine-project:before, body.ms-engine-project:after { display: none; }
}

/* --- home grid (source: post-5108.css container 8d84199) --- */
.ms-engine-home .ms-grid-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 36px;
  padding-bottom: 30px;
}
@media (max-width: 767px) {
  .ms-engine-home .ms-grid-cards { grid-template-columns: 1fr; }
}

/* --- covers + hover alternates (source: homepage inline custom CSS) --- */
.ms-engine img.ms-alt { display: none !important; }
.ms-engine img.ms-cover {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  height: auto;
  display: block;
}

/* --- captions (source: post-5108.css widgets cff5f28 / 183edf1 / dd9d579 / fd9b8e1) --- */
.ms-engine-home .ms-card-caption,
.ms-engine-home .ms-section-title {
  font-family: "IBM Plex Mono", Sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.6em;
  letter-spacing: 1.5px;
}
.ms-engine-home .ms-section-title { font-size: 11px; letter-spacing: 2px; color: #6E6E6E; }
.ms-engine-home .ms-card-caption { font-size: 12px; }
.ms-engine-home .ms-card-caption .ms-num { color: #6E6E6E; }
.ms-engine-home .ms-card-caption .ms-title { color: #F2F2F2; }
.ms-engine-home .ms-card-category,
.ms-engine-home .ms-count {
  font-family: "IBM Plex Mono", Sans-serif;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.6em;
  letter-spacing: 1.5px;
  color: #6E6E6E;
}
.ms-engine-home .ms-card-category,
.ms-engine-home .ms-count { text-align: end; }

/* --- fullscreen state (source: live site behavior, Studio v2.2.5 shim) --- */
body.ms-immersive .ms-sidebar { display: none; }

/* grid header: orange square marker + split label/count (source: live widget fd9b8e1 + dd9d579) */
.ms-engine-home .ms-grid-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; }
.ms-engine-home .ms-dot { display: inline-block; width: .45em; height: .45em; background: #FF5C1F; margin-right: .6em; }
.ms-engine-home .ms-grid, .ms-engine-home .ms-count, .ms-engine-home .ms-section-title { margin: 0; }
.ms-engine-home .ms-card { display: flex; flex-direction: column; gap: 6px; }

/* ===== Project shell (ported from live computed styles, 2026-11-22) ===== */
.ms-shell { display: flex; flex-direction: row; align-items: flex-start; padding: 10px; gap: 20px; box-sizing: border-box; }
.ms-sidebar {
  display: flex; flex-direction: column; gap: 10px;
  position: sticky; top: 42px;
  flex: 0 0 319px; box-sizing: border-box;
  padding: 16px 36px;
  border-right: 1px dashed #2a2a2a;
}
.ms-content { flex: 1 1 auto; min-width: 0; padding: 0; box-sizing: border-box; position: relative; }
/* The copy's Elementor tree still contains the original outer flex wrapper;
 * collapse it so the content column owns its live geometry (padding/width). */
.ms-content > .elementor > .elementor-element { display: contents; }
/* The copied content column keeps its live --width:74% (of the old outer
 * wrapper). Inside the shell it must fill the content area instead. */
.ms-content > .elementor > .elementor-element > .elementor-element { width: 100% !important; --width: 100% !important; }
.ms-content-head { position: fixed; top: 24px; right: 24px; z-index: 999; }
body.admin-bar .ms-content-head { top: 56px; }
@media (max-width: 767px) { .ms-content-head { display: none; } }

.ms-brand { font: 700 16px/16px Inter, sans-serif; letter-spacing: .5px; color: #F2F2F2; text-decoration: none; }
.ms-group { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.ms-group.ms-row { flex-direction: row; justify-content: space-between; align-items: baseline; }
.ms-label { font: 500 10px/16px "IBM Plex Mono", monospace; letter-spacing: 2px; text-transform: uppercase; color: #6E6E6E; }
.ms-value { font: 500 11px/17.6px "IBM Plex Mono", monospace; letter-spacing: 1.5px; text-transform: uppercase; color: #F2F2F2; }
.ms-project-title { font: 700 44px/44px Inter, sans-serif; letter-spacing: -1px; color: #F2F2F2; margin: 0; }
.ms-divider { height: 12px; position: relative; }
.ms-divider::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; border-top: 1px dashed #2a2a2a; }

.ms-sectnav { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.ms-sectnav a { display: flex; justify-content: space-between; width: 100%; box-sizing: border-box; font: 500 11px/17.6px "IBM Plex Mono", monospace; letter-spacing: 1.5px; text-transform: uppercase; color: #EDEDED; text-decoration: none; }
.ms-sq { display: inline-block; width: 5px; height: 5px; background: #FF5C1F; vertical-align: middle; }
.ms-arrow { color: #6E6E6E; }

.ms-project-nav { display: flex; flex-direction: row; justify-content: space-between; gap: 4px; padding: 2px 0; align-items: center; }
.ms-prev::before { content: "\2190\00a0"; }
.ms-next::after { content: "\00a0\2192"; }
.ms-prev, .ms-next { font: 400 10px/16px "IBM Plex Mono", monospace; letter-spacing: 1.5px; text-transform: uppercase; color: #8F8F8F; text-decoration: none; }

.ms-fs-btn { font: 500 11px/1.6 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: 2px; text-transform: uppercase; color: #EDEDED; background: rgba(10,10,10,.92); border: 1px solid rgba(255,252,245,.3); padding: 10px 16px; border-radius: 0; cursor: pointer; }

@media (max-width: 880px) {
  .ms-shell { flex-direction: column; }
  .ms-sidebar { position: static; flex: 0 0 auto; width: auto; border-right: 0; border-bottom: 1px dashed #2a2a2a; }
  .ms-content { padding: 28px 20px 40px; }
}

/* ===== Ported from the pages' stripped inline <style> (anon block, live cobi) ===== */
.ms-content .elementor a, .ms-content .elementor a:visited { color: #EDEDED; text-decoration: none; }
.ms-content .elementor a:hover { color: #FF5C1F; }
.ms-content .elementor img { border-radius: 0 !important; }
/* density-patch-v2 */
.ms-content .elementor-widget-divider .elementor-divider { padding-top: 6px !important; padding-bottom: 6px !important; }
.ms-content .elementor-widget-text-editor p { margin: 0; }
.ms-content .elementor-widget-menu-anchor { height: 0 !important; overflow: hidden !important; }
.ms-content .elementor-widget-menu-anchor + * { margin-top: -14px; }
.ms-content .ms-cover { width: 100%; }
.ms-content .ms-cover img { aspect-ratio: 4/3 !important; object-fit: cover; width: 100% !important; height: auto !important; display: block; }
@media (max-width: 1024px) { .ms-content .ms-cover img { aspect-ratio: 16/10 !important; } }
/* Fullscreen immersive (was: body.ms-immersive .elementor-element-e81ecb6/d1e9905) */
.ms-content { transition: width .25s ease; }
body.ms-immersive .ms-sidebar { display: none; }
body.ms-immersive .ms-content { width: 100% !important; }
/* Mobile alignment + tighter rhythm (ms-mobile-align), re-scoped from the
 * page-ID :is(...) list to any Elementor root inside the engine content. */
@media(max-width:767px){
	:where(.ms-content > .elementor) > .e-con{padding-left:12px!important;padding-right:12px!important}
	:where(.ms-content > .elementor) .e-con .e-con{padding-left:0!important;padding-right:0!important}
	:where(.ms-content > .elementor) .elementor-widget{padding-left:0!important;padding-right:0!important}
	:where(.ms-content > .elementor) .e-con:has(> .e-con > .ms-cover){margin-left:0!important;margin-right:0!important;width:100%!important;padding-top:8px!important;padding-bottom:0!important;gap:12px!important}
	:where(.ms-content > .elementor) .e-con:has(> .ms-cover){padding-top:0!important;padding-bottom:0!important}
	:where(.ms-content > .elementor) .ms-cover{padding-top:0!important;padding-bottom:0!important}
	:where(.ms-content > .elementor) .e-con:has(> .elementor-widget-menu-anchor):has(.ms-cover){padding-top:0!important;padding-bottom:0!important;gap:16px!important}
	:where(.ms-content > .elementor) .e-con:has(> .elementor-widget-menu-anchor):has(.ms-cover) > .e-con:has(> .e-con > .elementor-widget-heading){margin-top:0!important;padding-top:12px!important;gap:10px!important}
	:where(.ms-content > .elementor) .e-con:has(> .elementor-widget-menu-anchor):has(.ms-cover) > .e-con:has(> .e-con > .elementor-widget-heading) > .e-con:has(> .elementor-widget-heading){padding-top:0!important;padding-bottom:0!important}
	:where(.ms-content > .elementor) .e-con:has(> .elementor-widget-divider):not(:has(> .e-con)){padding-top:24px!important;padding-bottom:0!important}
}

/* ===== Mobile sidebar chrome (ported from live mobile computed geometry) ===== */
@media (max-width: 767px) {
  .ms-shell { padding: 10px 0 0; }
  .ms-sidebar {
    flex: 1 1 auto; width: 100%;
    position: static;
    padding: 24px 12px 24px;
    border-right: none;
    border-bottom: 1px dashed #2a2a2a;
  }
  .ms-project-title { font-size: 34px; line-height: 34px; }
  .ms-brand { padding: 4px 0; }
  .ms-sidebar > .ms-group:first-of-type { padding: 24px 0 16px; }
  .ms-sidebar .ms-divider { height: 13px; }
  .ms-sidebar .ms-divider::after { top: 6px; }
  .ms-group.ms-row { padding: 8px 0; }
  .ms-sectnav { padding: 24px 0 0; }
  /* density-patch-v3: dividers adjacent to the section nav vanish on mobile */
  .ms-sidebar > .ms-group + .ms-divider:has(+ .ms-sectnav),
  .ms-sectnav + .ms-divider { display: none; }
  .ms-project-nav { padding: 8px 0; }
}

/* ===== Home chrome ported from the homepage's stripped inline <style> ===== */
@media (min-width: 768px) {
  .ms-engine-home .ms-hero { flex-direction: row !important; flex-wrap: wrap !important; justify-content: space-between; align-items: flex-end; }
  .ms-engine-home .ms-herotag { order: 3; width: 100%; }
  .ms-engine-home .ms-intro { width: 340px; }
}
.ms-engine-home .ms-cta { position: relative; display: inline-block; }
.ms-engine-home .ms-cta-box { border: 1px solid rgba(255,252,245,.3); padding: 10px 16px; }
.ms-engine-home .ms-cta:after { content: ""; position: absolute; inset: -4px; opacity: 0; transition: opacity .18s; pointer-events: none; background: linear-gradient(#FF5C1F,#FF5C1F) left top/8px 2px no-repeat,linear-gradient(#FF5C1F,#FF5C1F) left top/2px 8px no-repeat,linear-gradient(#FF5C1F,#FF5C1F) right top/8px 2px no-repeat,linear-gradient(#FF5C1F,#FF5C1F) right top/2px 8px no-repeat,linear-gradient(#FF5C1F,#FF5C1F) left bottom/8px 2px no-repeat,linear-gradient(#FF5C1F,#FF5C1F) left bottom/2px 8px no-repeat,linear-gradient(#FF5C1F,#FF5C1F) right bottom/8px 2px no-repeat,linear-gradient(#FF5C1F,#FF5C1F) right bottom/2px 8px no-repeat; }
.ms-engine-home .ms-cta:hover:after, .ms-engine-home .ms-cta:focus-visible:after { opacity: 1; }
.ms-engine-home .ms-contactline a { white-space: nowrap; }
.ms-engine-home .elementor-widget-divider .elementor-divider { padding-top: 5px !important; padding-bottom: 5px !important; }
.ms-engine-home .elementor-widget-text-editor p { margin: 0; }
